From 10865f99529b72c8a5ff5931ab2c4a05074b2dfe Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sat, 26 May 2018 10:52:40 +0200 Subject: [PATCH] bash: escape alias values This should allow use of the apostrophe character within aliases without having to escape them manually. Fixes #273 --- modules/programs/bash.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/bash.nix b/modules/programs/bash.nix index 786478c1..6adcbd94 100644 --- a/modules/programs/bash.nix +++ b/modules/programs/bash.nix @@ -130,7 +130,7 @@ in config = ( let aliasesStr = concatStringsSep "\n" ( - mapAttrsToList (k: v: "alias ${k}='${v}'") cfg.shellAliases + mapAttrsToList (k: v: "alias ${k}=${escapeShellArg v}") cfg.shellAliases ); shoptsStr = concatStringsSep "\n" (