mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
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
This commit is contained in:
parent
76561002c2
commit
c6efc0b255
@ -14,12 +14,12 @@ let
|
|||||||
complPath = completionDirs ++ map (vendorDir "completions") pluginPkgs;
|
complPath = completionDirs ++ map (vendorDir "completions") pluginPkgs;
|
||||||
funcPath = functionDirs ++ map (vendorDir "functions") pluginPkgs;
|
funcPath = functionDirs ++ map (vendorDir "functions") pluginPkgs;
|
||||||
confPath = confDirs ++ map (vendorDir "conf") pluginPkgs;
|
confPath = confDirs ++ map (vendorDir "conf") pluginPkgs;
|
||||||
safeConfPath = map escapeShellArg confPath;
|
|
||||||
|
|
||||||
in writeShellScriptBin "fish" ''
|
in writeShellScriptBin "fish" ''
|
||||||
${fish}/bin/fish --init-command "
|
${fish}/bin/fish --init-command "
|
||||||
set --prepend fish_complete_path ${escapeShellArgs complPath}
|
set --prepend fish_complete_path ${escapeShellArgs complPath}
|
||||||
set --prepend fish_function_path ${escapeShellArgs funcPath}
|
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
|
||||||
" "$@"
|
" "$@"
|
||||||
'')
|
'')
|
||||||
|
Loading…
Reference in New Issue
Block a user