No I'm not happy about this brain damage. And no there will not be "on MacOS" or "on Linux" flavors, from me anyway.
# Install and setup
Windows 11, at the time of writing, doesn't come with the latest PowerShell. It will tell you that when you open PowerShell even. You can acquire it like this (or [some other way](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.3)):
`$PROFILE.CurrentUserAllHosts` is a good place to make customizations (if you're familiar with Bash it's similar to `~/.bashrc`). There is a specific `$PROFILE.CurrentUserCurrentHost` when you're inside VSCodium and other Hosts if you're interested in that but they all inherit from `$PROFILE.CurrentUserAllHosts` which is probably `~/Documents/PowerShell/profile.ps1` by the way!
Folders in the semi-colon seperated `$env:PATH` string are searched for cmdlets, executables and scripts to run (again, if you're familiar with Bash it's similar to `$PATH`). Putting the following in `$PROFILE` will make custom `.ps1` scripts in that same folder "global" (available from any prompt without specifying the whole path).
[`Split-Path`](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/split-path?view=powershell-7.3) is a pretty useful cmdlet for working with paths. Here we're saying "give me the parent folder for the current command path" which is the `$PROFILE` folder in this context. `$MyInvocation` is from the [automatic variables](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_automatic_variables?view=powershell-7.3#myinvocation) which are provided by PowerShell under-the-hood.
With this I've also added a [`Update-And-Clean.ps1`](./Update-and-Clean.ps1) script (in the `$PROFILE` folder) that will update Windows as well as `scoop` if it's installed and then run `bleachbit --preset --clean` (also only if installed) **which depends on whatever you've last checked in the BleachBit UI... so run that and set it up first!** The script will also try to re-invoke itself as Administrator if you're not in an elevated session already... which is usually. If you're familiar with Arch Linux you might say `yay`!