summaryrefslogtreecommitdiffstats
path: root/pkgs/shells
diff options
context:
space:
mode:
authorpacien <pacien.trangirard@pacien.net>2021-02-15 22:35:20 +0100
committerCole Helbling <cole.e.helbling@outlook.com>2021-02-16 11:01:43 -0800
commitc6efc0b255e19c93903d682b27119b38d1161a90 (patch)
tree8d5e3150daabd0b370e708b7a21cd9c71ea74064 /pkgs/shells
parent76561002c20ac5b6a41fe659363ca011fd790591 (diff)
wrapFish: fix singleton expansion in shell init
This fixes the expansion of the configuration path in the pathological case of a singleton, which would otherwise be used verbatim with the surrounding braces for lookup. GitHub: see https://github.com/NixOS/nixpkgs/pull/108491#pullrequestreview-590072603
Diffstat (limited to 'pkgs/shells')
-rw-r--r--pkgs/shells/fish/wrapper.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/shells/fish/wrapper.nix b/pkgs/shells/fish/wrapper.nix
index 053568bc6b9b..6713a69d560e 100644
--- a/pkgs/shells/fish/wrapper.nix
+++ b/pkgs/shells/fish/wrapper.nix
@@ -14,12 +14,12 @@ let
complPath = completionDirs ++ map (vendorDir "completions") pluginPkgs;
funcPath = functionDirs ++ map (vendorDir "functions") pluginPkgs;
confPath = confDirs ++ map (vendorDir "conf") pluginPkgs;
- safeConfPath = map escapeShellArg confPath;
in writeShellScriptBin "fish" ''
${fish}/bin/fish --init-command "
set --prepend fish_complete_path ${escapeShellArgs complPath}
set --prepend fish_function_path ${escapeShellArgs funcPath}
- for c in {${concatStringsSep "," safeConfPath}}/*; source $c; end
+ set --local fish_conf_source_path ${escapeShellArgs confPath}
+ for c in $fish_conf_source_path/*; source $c; end
" "$@"
'')