From 34e3fa3a4a012944ba7819659f5670a197885a2e Mon Sep 17 00:00:00 2001 From: Stel Abrego Date: Mon, 3 Oct 2022 14:37:28 -0700 Subject: [PATCH] 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. --- scripts/nix-profile.fish.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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