diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2018-09-28 23:42:55 +0200 |
---|---|---|
committer | xeji <36407913+xeji@users.noreply.github.com> | 2018-09-28 23:42:55 +0200 |
commit | 1e211a70cbdaf230a18ea4cb67a959039d5c2ddb (patch) | |
tree | 242d14d98a3918b117be59d889b1cd8b9ed9584a /nixos/modules/programs | |
parent | c4bd58d33785280596fb20bf53d556262a438123 (diff) | |
download | nixlib-1e211a70cbdaf230a18ea4cb67a959039d5c2ddb.tar nixlib-1e211a70cbdaf230a18ea4cb67a959039d5c2ddb.tar.gz nixlib-1e211a70cbdaf230a18ea4cb67a959039d5c2ddb.tar.bz2 nixlib-1e211a70cbdaf230a18ea4cb67a959039d5c2ddb.tar.lz nixlib-1e211a70cbdaf230a18ea4cb67a959039d5c2ddb.tar.xz nixlib-1e211a70cbdaf230a18ea4cb67a959039d5c2ddb.tar.zst nixlib-1e211a70cbdaf230a18ea4cb67a959039d5c2ddb.zip |
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`.
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r-- | nixos/modules/programs/zsh/zsh.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/programs/zsh/zsh.nix b/nixos/modules/programs/zsh/zsh.nix index b4ca8730958c..865d148c1629 100644 --- a/nixos/modules/programs/zsh/zsh.nix +++ b/nixos/modules/programs/zsh/zsh.nix @@ -11,7 +11,7 @@ let cfg = config.programs.zsh; zshAliases = concatStringsSep "\n" ( - mapAttrsFlatten (k: v: "alias ${k}='${v}'") cfg.shellAliases + mapAttrsFlatten (k: v: "alias ${k}=${escapeShellArg v}") cfg.shellAliases ); in |