vim-patch:8.0.1832: cannot use :unlet for an environment variable

Problem:    Cannot use :unlet for an environment variable.
Solution:   Make it work.  Use unsetenv() if available.
            (Yasuhiro Matsumoto, closes vim/vim#2855)
137374fd65
This commit is contained in:
Jan Edmund Lazo
2018-10-01 22:57:49 -04:00
parent 65206714bc
commit 07fbdf4acc
3 changed files with 44 additions and 0 deletions

View File

@@ -9136,6 +9136,14 @@ This does NOT work: >
variables are automatically deleted when the function
ends.
:unl[et] ${env-name} ... *:unlet-environment* *:unlet-$*
Remove environment variable {env-name}.
Can mix {name} and ${env-name} in one :unlet command.
No error message is given for a non-existing
variable, also without !.
If the system does not support deleting an environment
variable, it is made emtpy.
:lockv[ar][!] [depth] {name} ... *:lockvar* *:lockv*
Lock the internal variable {name}. Locking means that
it can no longer be changed (until it is unlocked).