Browse Source

homebrew: Load standard Homebrew environment variables into shell session.

However, guard for legacy Homebrew as `brew shellenv` is relatively new.
master
Indrajit Raychaudhuri 6 years ago committed by Kaleb Elwert
parent
commit
1db8f76859
  1. 11
      modules/homebrew/README.md
  2. 10
      modules/homebrew/init.zsh

11
modules/homebrew/README.md

@ -1,7 +1,16 @@
Homebrew 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 Aliases
------- -------

10
modules/homebrew/init.zsh

@ -10,6 +10,16 @@ if [[ "$OSTYPE" != (darwin|linux)* ]]; then
return 1 return 1
fi 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 # Aliases
# #

Loading…
Cancel
Save