mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
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:
parent
9a258edc10
commit
a08dabf015
1 changed files with 5 additions and 6 deletions
|
@ -29,13 +29,12 @@ let
|
|||
};
|
||||
});
|
||||
|
||||
abbrsStr = concatStringsSep "\n" (
|
||||
mapAttrsToList (k: v: "abbr --add --global ${k} '${v}'") cfg.shellAbbrs
|
||||
);
|
||||
abbrsStr = concatStringsSep "\n"
|
||||
(mapAttrsToList (k: v: "abbr --add --global -- ${k} ${escapeShellArg v}")
|
||||
cfg.shellAbbrs);
|
||||
|
||||
aliasesStr = concatStringsSep "\n" (
|
||||
mapAttrsToList (k: v: "alias ${k}='${v}'") cfg.shellAliases
|
||||
);
|
||||
aliasesStr = concatStringsSep "\n"
|
||||
(mapAttrsToList (k: v: "alias ${k} ${escapeShellArg v}") cfg.shellAliases);
|
||||
|
||||
in
|
||||
|
||||
|
|
Loading…
Reference in a new issue