mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-21 14:55:24 +00:00
[feature] Added os.delEnv; add delEnv support to nimscript too (#11466)
[feature] Fixes https://github.com/nim-lang/Nim/issues/11452.
This commit is contained in:
committed by
Andreas Rumpf
parent
eadea343ef
commit
7182922622
@@ -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].} =
|
||||
|
||||
Reference in New Issue
Block a user