Inherit parent's .envrc variables
I discovered direnv's convenient `source_up` function today. I needed it to inherit the values defined in ~/briefcase/.envrc, and it's working exactly as I expected it would. What a fine piece of software direnv is.
This commit is contained in:
parent
1772408c39
commit
138070f3f6
2 changed files with 5 additions and 2 deletions
|
@ -1,2 +0,0 @@
|
||||||
export client_id="$(pass show finance/monzo/client-id)"
|
|
||||||
export client_secret="$(pass show finance/monzo/client-secret)"
|
|
5
monzo_ynab/.envrc
Normal file
5
monzo_ynab/.envrc
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# source_up traversing up directories until it finds the nearest .envrc file,
|
||||||
|
# which it uses to extend the environment in this .envrc.
|
||||||
|
source_up
|
||||||
|
export client_id="$(pass show finance/monzo/client-id)"
|
||||||
|
export client_secret="$(pass show finance/monzo/client-secret)"
|
Loading…
Reference in a new issue