AmigaDOS had both global environment variables (using the ENV: device)
and local environment variables, that worked like the Unix
version. You manipulated them in a similar way in the shell, and they
had a similar API for programmers: one call with a flag to indicate
which you wanted. The ENV: device was an implementation detail that
let you save/restore the state of the global environment with file
commands. The posix calls checked the local then global variables.
Of course, this is now 10+ year old memory, and I may not RC.
Close enough. ENV: was a system defined logical name for a standard
system directory. The contents of that directory contained short files
(one line). The environment variable name was the file name, the
variable value, then, was the content of the file.
CLI commands for manipulating them tended to be of the order of
setenv name value
vs
set name value
for a shell local environment variable.
But AmigaOS also had those logical names mentioned, and those were
used in some places UNIX uses environment variables.
How would you like to refer to a directory?
HD0:myDirectory
SYS:myDirectory
myDir:
The first references via the hardware partition name; the second by
a volume label, and the third by a logical name (assign myDir:
SYS:myDirectory)
Windows lets one assign a volume label to a partition, but it is not
used for anything except display. Amiga volume labels were useful: one
could refer to two separate floppy disks by two different volume labels,
and the OS would prompt the user to insert the disk by name as needed.
Even more, if the need was fresh, rather than to perform I/O on an
already opened file, once could satisfy the prompt by putting the floppy
in ANY available floppy drive