brew/Library/Homebrew/cmd/shellenv.sh
Mike McQuaid 44bcf69d1f
cmd/shellenv: use Bash.
This speeds up execution by 3x on my machine and the script is simple
enough to warrant this.
2018-09-13 09:27:44 +01:00

19 lines
821 B
Bash

#: * `shellenv`:
#: Prints export statements - run them in a shell and this installation of
#: Homebrew will be included into your PATH, MANPATH, and INFOPATH.
#:
#: HOMEBREW_PREFIX, HOMEBREW_CELLAR and HOMEBREW_REPOSITORY are also exported
#: to save multiple queries of those variables.
#:
#: Consider adding evaluating the output in your dotfiles (e.g. `~/.profile`)
#: with `eval $(brew shellenv)`
homebrew-shellenv() {
echo "export HOMEBREW_PREFIX=\"$HOMEBREW_PREFIX\""
echo "export HOMEBREW_CELLAR=\"$HOMEBREW_CELLAR\""
echo "export HOMEBREW_REPOSITORY=\"$HOMEBREW_REPOSITORY\""
echo "export PATH=\"$HOMEBREW_PREFIX/bin:$HOMEBREW_PREFIX/sbin:\$PATH\""
echo "export MANPATH=\"$HOMEBREW_PREFIX/share/man:\$MANPATH\""
echo "export INFOPATH=\"$HOMEBREW_PREFIX/share/info:\$INFOPATH\""
}