diff options
author | Stel Abrego <stel@stel.codes> | 2022-10-03 14:37:28 -0700 |
---|---|---|
committer | Stel Abrego <stel@stel.codes> | 2022-10-03 14:37:28 -0700 |
commit | 34e3fa3a4a012944ba7819659f5670a197885a2e (patch) | |
tree | 02fabbd922a574a5e85a75bad098985d18dfd53f /scripts | |
parent | 3ae9467d57188f9db41f85b0e5c41c0c9d141955 (diff) |
Fix fish shell MANPATH creation
Previously the MANPATH was set even if MANPATH was empty beforehand
which resulted in a MANPATH of only ~/.nix-profile/share/man which
omitted the default man page directory (commonly /opt/local/share/man)
from man page results.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/nix-profile.fish.in | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/nix-profile.fish.in b/scripts/nix-profile.fish.in index 59d247771..8d783d7c0 100644 --- a/scripts/nix-profile.fish.in +++ b/scripts/nix-profile.fish.in @@ -28,7 +28,9 @@ if test -n "$HOME" && test -n "$USER" # Only use MANPATH if it is already set. In general `man` will just simply # pick up `.nix-profile/share/man` because is it close to `.nix-profile/bin` # which is in the $PATH. For more info, run `manpath -d`. - set --export --prepend --path MANPATH "$NIX_LINK/share/man" + if set --query MANPATH + set --export --prepend --path MANPATH "$NIX_LINK/share/man" + end fish_add_path --prepend --global "$NIX_LINK/bin" set --erase NIX_LINK |