Autoenv
.envrc
and .envrc.leave
files.
Autoenv automatically sources (known/whitelisted) This plugin adds support for enter and leave events. By default .envrc
files are used when entering a directory, and .envrc.leave
files when leaving a directory. And you can set variable CLICOLOR=1
for enabling colored output.
The environment variables $AUTOENV_ENTER_FILE
& $AUTOENV_LEAVE_FILE
can be used
to override the default values for the file names of .envrc
& .envrc.leave
respectively.
Example of use
- If you are in the directory
/home/user/dir1
and executecd /var/www/myproject
this plugin will source the following files if they exist
/home/user/dir1/.envrc.leave
/home/user/.envrc.leave
/home/.envrc.leave
/var/.envrc
/var/www/.envrc
/var/www/myproject/.envrc
- If you are in the directory
/
and executecd /home/user/dir1
this plugin will source the following files if they exist
/home/.envrc
/home/user/.envrc
/home/user/dir1/.envrc
- If you are in the directory
/home/user/dir1
and executecd /
this plugin will source the following files if they exist
/home/user/dir1/.envrc.leave
/home/user/.envrc.leave
/home/.envrc.leave