I like to use PowerShell for scripts (sometimes), while I use fish as a interactive shell. I'm a SW developer familiar with .NET, and it's reasonably easy to call any .NET functions from PowerShell while it's also easy to call any external program (do pipes and all this unixy things). Mostly, my use cases are things other people would use Python rather than Bash. PowerShell is a compromise between the two, in my view.
For example when I wanted to create and keep btrfs snapshot with exponential decay on their frequency, that would be quite tedious to write in Bash (I think, at least).
I used to like that I can run the same thing on Windows and Linux, but I stopped using Windows and got used to programs that would have to installed on Windows, so it's no longer an advantage to me. But in theory, it's still IMHO easier to run PowerShell script on Linux than it's to run Bash scripts on Windows.
I have not seen the nushell, thanks for posting that! From PowerShell I'd expect more online material and more stability.
It also has quite a bit of disadvantages:
* Sometimes it's called `powershell` and sometimes `pwsh`, breaking shebangs
* Startup is sloow. May be issue for some scripts that run often.
* Linux people sometimes look at me very strangely :D
* Installation size is significant if you count .NET into that. So not a good fit for setting up docker containers :/
(btw, it works on Linux for quite some time already)
> Sometimes it's called `powershell` and sometimes `pwsh`
This probably isn't something kbd would run into; the command is always `pwsh` on macOS/Linux.
Windows users get `powershell` (Powershell 5) and `pwsh` (Powershell Core 6 and Powershell 7) for backwards compatibility reasons. It's another `python` vs `python3` situation.
For example when I wanted to create and keep btrfs snapshot with exponential decay on their frequency, that would be quite tedious to write in Bash (I think, at least).
I used to like that I can run the same thing on Windows and Linux, but I stopped using Windows and got used to programs that would have to installed on Windows, so it's no longer an advantage to me. But in theory, it's still IMHO easier to run PowerShell script on Linux than it's to run Bash scripts on Windows.
I have not seen the nushell, thanks for posting that! From PowerShell I'd expect more online material and more stability.
It also has quite a bit of disadvantages: * Sometimes it's called `powershell` and sometimes `pwsh`, breaking shebangs * Startup is sloow. May be issue for some scripts that run often. * Linux people sometimes look at me very strangely :D * Installation size is significant if you count .NET into that. So not a good fit for setting up docker containers :/
(btw, it works on Linux for quite some time already)