diff --git a/system_files/usr/share/fish/vendor_conf.d/ublue-brew.fish b/system_files/usr/share/fish/vendor_conf.d/ublue-brew.fish index 76c2cc1..99f4dd6 100644 --- a/system_files/usr/share/fish/vendor_conf.d/ublue-brew.fish +++ b/system_files/usr/share/fish/vendor_conf.d/ublue-brew.fish @@ -1,13 +1,17 @@ #!/usr/bin/fish #shellcheck disable=all if status --is-interactive - if [ -d /home/linuxbrew/.linuxbrew ] - eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv fish)" + if test -d /home/linuxbrew/.linuxbrew + /home/linuxbrew/.linuxbrew/bin/brew shellenv fish | source + + # Prioritize system binaries to prevent brew overriding things like dbus + fish_add_path --move --append --path (brew --prefix)/bin (brew --prefix)/sbin + if test -d (brew --prefix)/share/fish/completions - set -p fish_complete_path (brew --prefix)/share/fish/completions + set -ga fish_complete_path (brew --prefix)/share/fish/completions end if test -d (brew --prefix)/share/fish/vendor_completions.d - set -p fish_complete_path (brew --prefix)/share/fish/vendor_completions.d + set -ga fish_complete_path (brew --prefix)/share/fish/vendor_completions.d end end end