zlacker

[return to "The Case for Nushell (2023)"]
1. Natfan+Jj[view] [source] 2026-01-07 17:30:54
>>raveni+(OP)
i've never used nushell, but i've always felt that people have been sleeping on PowerShell.

yes, it was _originally_ only for Windows, but PowerShell 6+ uses .NET Core, which is OS independent. this means that a few helper functions like GeneratePassword[0] are gone, but it's _mostly_ at parity with .NET.

the Verb-Noun structure can be confusing at first, but once you know the approved verbs[1], you can usually guess your way through command discovery, which is not something i can say for most POSIX tools (useradd and adduser do different things!!)

it's also object oriented by design, with default aliases like ?[2] and %[3], querying structured data is a breeze.

- want to check a CSV? Import-CSV[4].

- want to call a REST/SOAP endpoint? Invoke-RestMethod[5] has you covered.

- DNS queries? Resolve-DnsName[6]

as it's built on top of .NET, you get the whole CLR[7] at your fingertips! you can make a TCP client[8] in PowerShell, or even just write C# directly in your terminal[9] and execute it the same way.

such a flexible and useful language, even if it is a little slow and owned by micro$oft. but it _is_ open source[10]!

---

[0]: https://learn.microsoft.com/dotnet/api/system.web.security.m...

[1]: https://learn.microsoft.com/powershell/scripting/developer/c...

[2]: https://learn.microsoft.com/powershell/module/microsoft.powe...

[3]: https://learn.microsoft.com/powershell/module/microsoft.powe...

[4]: https://learn.microsoft.com/powershell/module/microsoft.powe...

[5]: https://learn.microsoft.com/powershell/module/microsoft.powe...

[6]: https://learn.microsoft.com/powershell/module/dnsclient/reso...

[7]: https://learn.microsoft.com/dotnet/standard/clr

[8]: https://learn.microsoft.com/dotnet/api/system.net.sockets.tc...

[9]: https://devblogs.microsoft.com/scripting/weekend-scripter-ru...

[10]: https://github.com/PowerShell/PowerShell

◧◩
2. adzm+Ow[view] [source] 2026-01-07 18:15:10
>>Natfan+Jj
Powershell is pretty great, though I am constantly bit by issues with filenames having [ or ] in them and end up having to pass -LiteralPath to everything, which is frustrating and a constant source of bugs in any other scripts that do not do that.
◧◩◪
3. Natfan+BCa[view] [source] 2026-01-10 19:19:21
>>adzm+Ow
can you not just quote the filepaths? either as a 'literal string' or as one with "string $interpolation" (provided you have no dollars in your file names)
[go to top]