tl;dr Just add following function to ~/.config/fish/config.fish function brew set -xl PATH $PATH # Protect global PATH by local PATH if type -q pyenv; and contains (pyenv root)/shims $PATH set -e PATH[(contains -i (pyenv root)/shims $PATH)] end command brew $argv end