mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 03:06:40 +00:00
a56c0b54faa1e7d5311c44e472a20f1bd41a164b
Quick and hacky bash script which supports loading .envrc files suitable
for direnv, but with support for local override files, and named
environment files, and supports looking for the .envrc* files upwards in
parent folders.
For example, when you run:
envy echo hi
It will look in the current folder, and all parent folders for any files
named:
- .envrc
- .envrc.local
- .envrc.echo
- .envrc.echo.local
The first such file that is found is considered to be in the project
root, and all further files checked for will only be checked for in said
project root.
The first argument to envy is considered a environment name if there is
a matching .envrc.<name> file. If not such machine file is found, the
first argument is treated as part of the command you want to run.
Meaning with the above example, if ".envrc.echo" or ".envrc.echo.local"
exists, the command that will be executed is "hi", but if neither of
them exist, it will execute "echo hi".
To define environment variables in a .envrc* file, you use use bash's
export statement.
Description
My personals dotfiles with any quirks, oddities, bugs, and man-eating errors I live with on a daily basis.
Languages
CSS
95.6%
Shell
1.9%
Ruby
1%
Lua
0.9%
JavaScript
0.4%
Other
0.1%