i had to add something to the PATH environment variable on Windows and i got the first few attempts wrong, and in the end had to look up how to do it... my pride... a thing my twenty-years-younger self could do, but not me... all these batch commands lost, like tears in rain...

it's not really that surprising however, over time

export PATH=$PATH:/foo/bar

would naturally supplant

set PATH=%PATH%;C:\foo\bar

simply because the former has vastly more day-to-day relevance to my life now; the last time i did the latter, it was on MS-DOS

i'm having a bit of a berenstain bears effect with believing that %variable% was surely never how MS-DOS did variable substitution (surely it's some newfangled Windows NT thing?!), but here it is in the MS-DOS 5.0 manual!

https://archive.org/details/bitsavers_microsoftm5.0UsersGuideandReference1991_25077359/page/559/mode/2up

microsoft :: msdos 5 :: Microsoft - MS-DOS 5.0 Users Guide and Reference 1991 : Free Download, Borrow, and Streaming : Internet Archive

From the bitsavers.org collection, a scanned-in computer-related document.microsoft :: msdos 5 :: Microsoft - MS-DOS 5.0 Users Guide and Reference 1991

Internet Archive
one of my whimsical life regrets is that, as a kid, i understood that batch was a programming language, but i couldn't figure out how to write anything useful with it, because i didn't know where to look for documentation. imagine, imagine, i could've been a batch programmer!
i suppose batch files were always far more limited in what they could do than even the most primitive unix environment, though? i'm not sure if you can even do arithmetic

APPENDING PYTHON TO MY PATH DIDN'T WORK BECAUSE IT HITS THE FAKE PYTHON.EXE BUNDLED WITH WINDOWS THAT BRINGS UP THE MICROSOFT STORE PAGE!!!

the tanks roll on redmond tomorrow. you have my word. there will be no quarter

while you're here, here's a useful tip:

you don't have to modify the global PATH on Windows! the familiar bash export + source trick has an equivalent for batch files: you use set and then run the batch file normally within a cmd session. idk what to do for PowerShell

@hikari environment variables in powershell are accessed through $env:VARIABLE_NAME and work the same as any other variable

which is actually sort of nice but only if you can remember it

@hikari i actually find the fake python quite helpful, it works basically fine for glasgow purposes and is easier to install
@hikari if you’re going to bundle a fake python.exe that redirects to where to download a sanctioned python, why would you not simply bundle the sanctioned python in the first place
@0xabad1dea @hikari i think they did this with curl and it didn't work out well

@whitequark @0xabad1dea @hikari I think it's better with curl because at least curl doesn't change that much. sure, your version might be ancient, and sure, it might make some corporate audit scanners really angry, but mostly it's fine

but python? most people don't appreciate having an ancient version of python

@demize @whitequark @0xabad1dea python is a nuanced topic. there was this horrible era where everyone had python 2.7 installed system-wide and therefore half of software relied on that intentionally or not
@demize @whitequark @0xabad1dea @hikari But they didn't bundle curl. They shelled around the internal powershell downloader with no support for most curl things.
@AMS @demize @whitequark @0xabad1dea @hikari recent versions of windows do bundle curl (not just a binary that tells you where to download it) but still have the idiotic default alias in powershell
@hikari the fake Python can be disabled somewhere in the Settings app. There’s a page like “App execution aliases” or something like that.