diff --git a/modules/homebrew/README.md b/modules/homebrew/README.md index 98a3444..1a6df51 100644 --- a/modules/homebrew/README.md +++ b/modules/homebrew/README.md @@ -1,7 +1,16 @@ Homebrew ======== -Defines Homebrew aliases. +Defines Homebrew specific shell environment variables and aliases. + +Environment Variables +--------------------- + +Execute the following to list the environment variables loaded in the shell: + +```sh +brew shellenv +``` Aliases ------- diff --git a/modules/homebrew/init.zsh b/modules/homebrew/init.zsh index e517c0a..12acf59 100644 --- a/modules/homebrew/init.zsh +++ b/modules/homebrew/init.zsh @@ -10,6 +10,16 @@ if [[ "$OSTYPE" != (darwin|linux)* ]]; then return 1 fi +# +# Environmental Variables +# + +# Load standard Homebrew shellenv into the shell session. +# `brew shellenv` is relatively new, guard for legacy Homebrew. +if (( $+commands[brew] )); then + eval "$(brew shellenv 2> /dev/null)" +fi + # # Aliases #