diff --git a/fish/config.fish b/fish/config.fish index 0b17075..75b89c3 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -21,7 +21,13 @@ if test -f ~/.nix-profile/etc/profile.d/nix.sh for line in (bash -c 'source $0; for name in "${!NIX_@}"; do printf "%s=%s\n" "$name" "${!name}"; done' ~/.nix-profile/etc/profile.d/nix.sh) set -gx (string split -m 1 = $line) end - set PATH ~/.nix-profile/bin $PATH 2>/dev/null + if functions -q fish_add_path + fish_add_path -gP ~/.nix-profile/bin + else + if not contains -- ~/.nix-profile/bin $PATH + set PATH ~/.nix-profile/bin $PATH 2>/dev/null + end + end end # Fish package manager