> My eyes are certainly Linux-tinted, but is there some sort of analogue to 
> the above for Windows?

Sort of. Please sit back, the story is long, below.

I've lived through all this history: I've used Unix & Linux of many flavors,
and I've also used CP/M & MS-DOS 1.0 on & Windows on.

--- David A. Wheeler

===========================

Windows does have environment variables, the PATH environment variable,
and a notion equivalent to Linux's "home directory".
You can see various environment variable values here:
https://en.wikipedia.org/wiki/Environment_variable#Default_values
https://docs.microsoft.com/en-us/windows/win32/shell/knownfolderid?redirectedfrom=MSDN

Let's assume we can ignore Windows XP, and focus on Vista & later.
In that case, the environment variable USERPROFILE is more-or-less
the same as Unix HOME.
(Beware: HOMEPATH isn't quite the same, because it omits the HOMEDRIVE,
and if the home directory is remote there *is* no HOMEDRIVE).
You can see this joyousness here:
https://github.com/mitchellh/go-homedir/issues/23

So in Windows command shell you can refer to USERPATH as %USERPATH%
(just like $HOME is Unix/Linux shell).

HOWEVER, there's also history to be considered, especially
CP/M -> Quick-n-Dirty DOS -> MS-DOS -> Windows.
MS-DOS 1.0 didn't have directories, just drive letters,
so people *had* to store things in the "root" of the drive.

MS-DOS 2.0 added directories, and later Windows added home directories.
However, Windows, up through and including Windows XP, had the
equivalent of home directories in:
\Documents and Settings\{username} 
So "\Documents and Settings" was sort-of like /home.
This was HIDEOUS for programs and users, because
"Documents and Settings" is absurdly long AND has spaces in it,
which is pain for Windows shell similar to the pain of Unix shell.
So people often continued to store directories (at least) at the top,
e.g, C:\metamath.

More recent Windows now uses "\Users\{username}" instead of
"\Documents and Settings\{username}" but the damage is done;
many users don't use their home directory much (!).

There's a general convention in Windows that you'll
install software using an installer that will place executables
so that you don't have to manipulate the PATH.
That's true for other systems too, but creating such installers
is more work on Windows. It's possible, though.

There are other differences, e.g.:
* Windows line ending is conventionally CRLF, vs POSIX's LF
* Windows directory separator is "\". However the file system *DOES* accept "/" 
as a directory separator, so you can often use "/" and it just works. One 
problem: Command line commands often use "/" as the option prefix (instead of 
"-"), but this is inconsistent.
* PATH is ;-separated, not :-separated, but otherwise works the same way.

Windows is really a mess. They've tried to walk back some of the mistakes 
(e.g., the new "Users" directory). But screw-ups like drive letters and using 
"\" as the directory separator are hard to fully undo.

-- 
You received this message because you are subscribed to the Google Groups 
"Metamath" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/metamath/E1jWN6D-0007AM-3e%40rmmprod06.runbox.

Reply via email to