diff options
author | c74d <8573dd@gmail.com> | 2018-10-06 19:48:43 +0000 |
---|---|---|
committer | c74d <8573dd@gmail.com> | 2018-10-06 20:01:27 +0000 |
commit | d8bcd2c3d8f0bb346ed899ee1a971de488d4178b (patch) | |
tree | dc32835d5e969057a5af7b075f27dddac7469054 /nixos/modules/programs | |
parent | 4af5457ebb10fe2fb1c10498b0ca307cf6298d92 (diff) | |
download | nixlib-d8bcd2c3d8f0bb346ed899ee1a971de488d4178b.tar nixlib-d8bcd2c3d8f0bb346ed899ee1a971de488d4178b.tar.gz nixlib-d8bcd2c3d8f0bb346ed899ee1a971de488d4178b.tar.bz2 nixlib-d8bcd2c3d8f0bb346ed899ee1a971de488d4178b.tar.lz nixlib-d8bcd2c3d8f0bb346ed899ee1a971de488d4178b.tar.xz nixlib-d8bcd2c3d8f0bb346ed899ee1a971de488d4178b.tar.zst nixlib-d8bcd2c3d8f0bb346ed899ee1a971de488d4178b.zip |
nixos/bash: Use `escapeShellArg` for shell aliases
This patch uses the library function `lib.escapeShellArg` to improve the handling of shell aliases in the NixOS module `bash`, copying the corresponding change made to the `zsh` module in commit 1e211a70cbdaf230a18ea4cb67a959039d5c2ddb (for which GitHub pull request #47471 was filed). This patch resolves GitHub issue #16973. This change presumably also should be copied to the `fish` module, but I don't know `fish` syntax so that won't be done by me. GitHub: Close NixOS/nixpkgs#16973.
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r-- | nixos/modules/programs/bash/bash.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/programs/bash/bash.nix b/nixos/modules/programs/bash/bash.nix index 424e1506b4c5..f664e2225550 100644 --- a/nixos/modules/programs/bash/bash.nix +++ b/nixos/modules/programs/bash/bash.nix @@ -33,7 +33,7 @@ let ''; bashAliases = concatStringsSep "\n" ( - mapAttrsFlatten (k: v: "alias ${k}='${v}'") cfg.shellAliases + mapAttrsFlatten (k: v: "alias ${k}=${escapeShellArg v}") cfg.shellAliases ); in |