Handbook
Glossary
set-os-env ( value key -- )
Environment variables
Prev:
os-envs ( -- assoc )
Next:
unset-os-env ( key -- )
Vocabulary
environment
Inputs
value
a
string
key
a
string
Outputs
None
Word description
Set an environment variable.
Notes
Names and values of environment variables are operating system-specific.
See also
os-env
,
os-envs
,
unset-os-env
,
set-os-envs
,
set-os-envs-pointer
,
change-os-env
,
with-os-env
Definition
USING:
system
;
IN:
environment
HOOK:
set-os-env
os
( value key -- )
Methods
USING:
environment
kernel
libc
system
unix.ffi
;
M:
unix
set-os-env
over
[
swap
1
setenv
io-error
]
[
nip
unset-os-env
]
if
;