programs/zsh: properly escape shell aliases

Otherwise all aliases break that use single quotes inside.

Already fixed in the nixpkgs module in 1e211a70cbdaf230a18ea4cb67a959039d5c2ddb.

(cherry picked from commit 465d08d99f)
This commit is contained in:
Maximilian Bosch 2019-02-28 11:29:16 +01:00 committed by Robert Helgesson
parent dd94a849df
commit 3c2823e3cd
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -15,7 +15,7 @@ let
localVarsStr = config.lib.zsh.defineAll cfg.localVariables;
aliasesStr = concatStringsSep "\n" (
mapAttrsToList (k: v: "alias ${k}='${v}'") cfg.shellAliases
mapAttrsToList (k: v: "alias ${k}=${lib.escapeShellArg v}") cfg.shellAliases
);
zdotdir = "$HOME/" + cfg.dotDir;