fish: escape abbrs and aliases

Some of my aliases have apostrophes in them, so shell-escaping them is a
must.
This commit is contained in:
Cole Helbling 2020-02-14 13:36:44 -08:00 committed by Robert Helgesson
parent 9a258edc10
commit a08dabf015
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -29,13 +29,12 @@ let
}; };
}); });
abbrsStr = concatStringsSep "\n" ( abbrsStr = concatStringsSep "\n"
mapAttrsToList (k: v: "abbr --add --global ${k} '${v}'") cfg.shellAbbrs (mapAttrsToList (k: v: "abbr --add --global -- ${k} ${escapeShellArg v}")
); cfg.shellAbbrs);
aliasesStr = concatStringsSep "\n" ( aliasesStr = concatStringsSep "\n"
mapAttrsToList (k: v: "alias ${k}='${v}'") cfg.shellAliases (mapAttrsToList (k: v: "alias ${k} ${escapeShellArg v}") cfg.shellAliases);
);
in in