Handbook
Glossary
os-env ( key -- value )
Environment variables
Next:
os-envs ( -- assoc )
Vocabulary
environment
Inputs
key
a
string
Outputs
value
a
string
Word description
Looks up the value of a shell environment variable.
Examples
This is an operating system-specific feature. On Unix, you can do:
USING: environment io ; "USER" os-env print
jane
See also
os-envs
,
set-os-env
,
unset-os-env
,
set-os-envs
,
set-os-envs-pointer
,
change-os-env
,
with-os-env
Definition
USING:
system
;
IN:
environment
HOOK:
os-env
os
( key -- value )
Methods
USING:
environment
system
unix.ffi
;
M:
unix
os-env
getenv
;