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.
This commit is contained in:
parent
3ae9467d57
commit
34e3fa3a4a
|
@ -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
|
# 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`
|
# 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`.
|
# which is in the $PATH. For more info, run `manpath -d`.
|
||||||
|
if set --query MANPATH
|
||||||
set --export --prepend --path MANPATH "$NIX_LINK/share/man"
|
set --export --prepend --path MANPATH "$NIX_LINK/share/man"
|
||||||
|
end
|
||||||
|
|
||||||
fish_add_path --prepend --global "$NIX_LINK/bin"
|
fish_add_path --prepend --global "$NIX_LINK/bin"
|
||||||
set --erase NIX_LINK
|
set --erase NIX_LINK
|
||||||
|
|
Loading…
Reference in a new issue