|
|
|
@ -219,6 +219,14 @@ rec { |
|
|
|
|
*/ |
|
|
|
|
escapeShellArgs = concatMapStringsSep " " escapeShellArg; |
|
|
|
|
|
|
|
|
|
/* Turn a string into a Nix expression representing that string |
|
|
|
|
|
|
|
|
|
Example: |
|
|
|
|
escapeNixString "hello\${}\n" |
|
|
|
|
=> "\"hello\\\${}\\n\"" |
|
|
|
|
*/ |
|
|
|
|
escapeNixString = s: escape ["$"] (builtins.toJSON s); |
|
|
|
|
|
|
|
|
|
/* Obsolete - use replaceStrings instead. */ |
|
|
|
|
replaceChars = builtins.replaceStrings or ( |
|
|
|
|
del: new: s: |
|
|
|
|