Direnv env var additions, overrides, and removals
I use direnv to overlay folder specific configurations in projects when I cd into them.
My default way to set it up is a
dotenvVAR1=heyThen you run
❯ direnv allowdirenv: loading ~/dev/thought-eddies/src/content/til/direnv/.envrcdirenv: export +VAR1I was used to always seeing +s but today I saw ~.
I learned ~ is a modification and - is a removal, so with a setup like the following (on my machine), the following file setup elicits all three.
dotenvunset PAGERVAR1=heyEDITOR=code❯ direnv allowdirenv: loading ~/dev/thought-eddies/src/content/til/direnv/.envrcdirenv: export +VAR1 -PAGER ~EDITORRecommended
Accessing direnv environment variables in a Jupyter notebook
I use direnv to manage my shell environment for projects. When using a Jupyter notebook within a project, I realized that the environment variables...
Subscribe
Get notified when I publish new posts. No spam, unsubscribe anytime.