summary refs log tree commit diff stats
path: root/lib/system
diff options
context:
space:
mode:
authorKaushal Modi <kaushal.modi@gmail.com>2019-06-15 05:32:26 -0400
committerAndreas Rumpf <rumpf_a@web.de>2019-06-15 11:32:26 +0200
commit71829226229287f4e1d38c9e4e91fb3d8b8fb648 (patch)
tree176418cf8ba5a6d1b400489978bdb96de7e07ecc /lib/system
parenteadea343ef7ef49026eccbd9a5f4d5df5071ceb4 (diff)
downloadNim-71829226229287f4e1d38c9e4e91fb3d8b8fb648.tar.gz
[feature] Added os.delEnv; add delEnv support to nimscript too (#11466)
[feature] Fixes https://github.com/nim-lang/Nim/issues/11452.
Diffstat (limited to 'lib/system')
-rw-r--r--lib/system/nimscript.nim10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/system/nimscript.nim b/lib/system/nimscript.nim
index 1c4986aa4..3411f1e6e 100644
--- a/lib/system/nimscript.nim
+++ b/lib/system/nimscript.nim
@@ -114,15 +114,19 @@ proc cmpic*(a, b: string): int =
   cmpIgnoreCase(a, b)
 
 proc getEnv*(key: string; default = ""): string {.tags: [ReadIOEffect].} =
-  ## Retrieves the environment variable of name `key`.
+  ## Retrieves the environment variable of name ``key``.
   builtin
 
 proc existsEnv*(key: string): bool {.tags: [ReadIOEffect].} =
-  ## Checks for the existence of an environment variable named `key`.
+  ## Checks for the existence of an environment variable named ``key``.
   builtin
 
 proc putEnv*(key, val: string) {.tags: [WriteIOEffect].} =
-  ## Sets the value of the environment variable named key to val.
+  ## Sets the value of the environment variable named ``key`` to ``val``.
+  builtin
+
+proc delEnv*(key: string) {.tags: [WriteIOEffect].} =
+  ## Deletes the environment variable named ``key``.
   builtin
 
 proc fileExists*(filename: string): bool {.tags: [ReadIOEffect].} =