I use zsh as my primary shell and have added a few crucial directories to $PATH in my ~/.zshenv:
- $HOME/.rvm/bin (allows use of rvm ruby)
- /usr/local/bin (Homebrew binaries)
- /usr/local/mysql/bin (mysql executable)
- a personal scripts directory
This prevents me from needing to specify absolute paths in many of my scripts. As far as I know, bash lacks a file that is automatically sourced for scripts (non-interactive shells); instead you need to set the BASH_ENV environment variable to point to such a file. I'd like to avoid setting this in all of my Alfred bash scripts