Configuration and utilities for Homebrew in the fish shell.
Install with Fisher (recommended):
fisher install halostatue/fish-brew@v3.x
Adds Homebrew paths to $PATH
. This uses the fish_add_path
function included
with Fish 3.2. This is not set in $fish_user_paths
because the correct order
for Homebrew paths is:
(brew --prefix)/bin
/usr/local/bin
/usr/bin
/bin
(brew --prefix)/sbin
/usr/local/sbin
/usr/sbin
/sbin
If (brew --prefix)/bin
and (brew --prefix)/sbin
are placed in
$fish_user_paths
, then (brew --prefix)/sbin
would end up being placed
before /usr/bin
, which might result in odd behaviours.
If Homebrew is installed into ~/.brew
, this will be detected.
If $HOME/.config/brew/config.fish
exists, it will be sourced during
initialization. This allows the loading of configuration values like
$HOMEBREW_GITHUB_API_TOKEN
. See the brew
discussion on Environment for
more details.
has_keg openssl
Returns true if the named keg is installed. Previously known as has:keg
.
has_cask macvim
Returns true if the named cask is installed. Previously known as has:cask
.