bash: escape alias values

This should allow use of the apostrophe character within aliases
without having to escape them manually.

Fixes #273
This commit is contained in:
Robert Helgesson 2018-05-26 10:52:40 +02:00
parent dfaccdd03b
commit 10865f9952
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -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" (