aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/shell.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/shell.nix b/lib/shell.nix
index fd90034..e6ba22c 100644
--- a/lib/shell.nix
+++ b/lib/shell.nix
@@ -9,7 +9,7 @@ let
9 concatStringsSep "\n" (mapAttrsToList mapping attrs); 9 concatStringsSep "\n" (mapAttrsToList mapping attrs);
10 10
11 fmt = rec { 11 fmt = rec {
12 codeBlock = code: text: ''"\e[${code}m"${text}"\e[0m"''; 12 codeBlock = code: text: ''"\e[${code}m"${escapeShellArg text}"\e[0m"'';
13 keyword = codeBlock "1;36"; 13 keyword = codeBlock "1;36";
14 section = codeBlock "4;35"; 14 section = codeBlock "4;35";
15 printSectionTitle = title: ''echo -e "\n\n"${section title}"\n"''; 15 printSectionTitle = title: ''echo -e "\n\n"${section title}"\n"'';
@@ -26,7 +26,7 @@ in rec {
26 exportEnvVars = mapAttrsToLines exportEnvVar; 26 exportEnvVars = mapAttrsToLines exportEnvVar;
27 27
28 printEnvVar = k: v: '' 28 printEnvVar = k: v: ''
29 echo -e ${fmt.keyword (escapeShellArg "$" + k)}: ${escapeShellArg v} 29 echo -e ${fmt.keyword ("$" + k)}: ${escapeShellArg v}
30 ''; 30 '';
31 31
32 printEnvVars = envVars: '' 32 printEnvVars = envVars: ''