{"repo":"zpm-zsh/autoenv","free":true,"listed":false,"github":"https://github.com/zpm-zsh/autoenv","clone":"git clone https://github.com/zpm-zsh/autoenv.git","description":"Autoenv for zsh","language":"Shell","stars":175,"topics":["zsh","plugin","shell","autoenv","zsh-plugin","zpm","zsh-plugins"],"license":"GPL-3.0","category":"cli-tools","readme_excerpt":"Autoenv Until recently, the default file name used by this plugin was .env , but now it is .in . This is done in order not to conflict with .env files from numerous projects. Autoenv automatically sources (known/whitelisted) .in and .out files. This plugin adds support for enter and leave events. By default .in files are used when entering a directory, and .out files when leaving a directory. And you can set variable CLICOLOR=1 for enabling colored output. The environment variables $AUTOENV IN FILE & $AUTOENV OUT FILE can be used to override the default values for the file names of .in & .out respectively. Example of use - If you are in the directory /home/user/dir1 and execute cd /var/www/myproject this plugin will source the following files if they exist - If you are in the directory / and execute cd /home/user/dir1 this plugin will source the following files if they exist - If you are in the directory /home/user/dir1 and execute cd / this plugin will source the following files if they exist Examples of .in and .out files An envfile is sourced in the directory you moved to, not in its own. To reach files next to it use $(dirname $0) ; the directory it belongs to is also passed as the first argument to both .in and .out scripts. Don't use pwd or $PWD for this. Earlier versions changed into the envfile's directory before sourcing it, so $PWD happened to point there. Doing that disturbed the directory stack, $OLDPWD and cd - , and it no longer happens. An envfile that used rel","default_branch":null,"files":null,"tree":[],"storefront":"/r/zpm-zsh","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/zpm-zsh/autoenv/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}