fish: escape abbr expansions once again
Commit 8cedd6 `fish: support flexible abbreviations` removed shell escaping for fish shell abbr values. This was a dangerous breaking change offered little value and made writing abbr expansions more difficult. This commit restores automatic shell escaping of fish abbr values.
This commit is contained in:
parent
b897544a79
commit
8b797c8eea
2 changed files with 20 additions and 9 deletions
|
|
@ -207,7 +207,8 @@ let
|
|||
modifiers = if isAttrs def then mods else "";
|
||||
expansion = if isAttrs def then def.expansion else def;
|
||||
in "abbr --add ${modifiers} -- ${name}"
|
||||
+ optionalString (expansion != null) " \"${expansion}\"") cfg.shellAbbrs);
|
||||
+ optionalString (expansion != null) " ${escapeShellArg expansion}")
|
||||
cfg.shellAbbrs);
|
||||
|
||||
aliasesStr = concatStringsSep "\n"
|
||||
(mapAttrsToList (k: v: "alias ${k} ${escapeShellArg v}") cfg.shellAliases);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue