mirror of
https://github.com/nix-community/home-manager.git
synced 2026-06-05 21:02:51 +00:00
zsh: escape double-quoted values
The zsh value renderer emits strings in double quotes so session variables can still expand references such as $HOME. Embedded quotes, backslashes, and backticks were not escaped, which could corrupt generated zsh code or trigger command substitution. Escape those double-quote-sensitive characters while preserving dollar expansion for existing session-variable semantics.
This commit is contained in:
@@ -7,7 +7,7 @@ rec {
|
||||
if builtins.isBool v then
|
||||
if v then "true" else "false"
|
||||
else if builtins.isString v then
|
||||
''"${v}"''
|
||||
''"${lib.escape [ "\\" "\"" "`" ] v}"''
|
||||
else if builtins.isList v then
|
||||
let
|
||||
shell = import ./shell.nix { inherit lib; };
|
||||
|
||||
Reference in New Issue
Block a user