nixos/zsh: use `escapeShelLArg' for shell aliases (#47471)
Previously single quotes were used by default for aliases and the module never warned about possible collisions when having a shell alias which relies on single quotes. Adding `escapeShellArg` works around this fixes the issue and ensures that a properly quoted value is written to `/etc/zshrc`.
This commit is contained in:
parent
c4bd58d337
commit
1e211a70cb
@ -11,7 +11,7 @@ let
|
|||||||
cfg = config.programs.zsh;
|
cfg = config.programs.zsh;
|
||||||
|
|
||||||
zshAliases = concatStringsSep "\n" (
|
zshAliases = concatStringsSep "\n" (
|
||||||
mapAttrsFlatten (k: v: "alias ${k}='${v}'") cfg.shellAliases
|
mapAttrsFlatten (k: v: "alias ${k}=${escapeShellArg v}") cfg.shellAliases
|
||||||
);
|
);
|
||||||
|
|
||||||
in
|
in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user