zlacker

The Case for Nushell (2023)

submitted by raveni+(OP) on 2026-01-07 16:15:01 | 67 points 71 comments
[view article] [source] [go to bottom]

NOTE: showing posts with links only show all posts
1. xpe+ra[view] [source] 2026-01-07 16:53:28
>>raveni+(OP)
A nice coincidence to read this; I was just telling some friends the following (lightly edited):

Nushell is amazing and a total pleasure to use. I cannot yet discern any limit to how much thought has been put into it.

I’m stunned in a good way. I’m writing shell scripts without any pain — actually I much prefer them to Python! With the language-server integration – I use Zed, but I'm sure they exist in VS Code and others too – I can see errors in scripts as I write them! (Including typos in pathnames! Amazing.)

I have to admit Nushell didn’t become my daily driver right away; it took a few years for me to switch fully. I don't know exactly why, but it probably had to do with its lack of POSIX compatibility. I now see this as a necessary break for Nushell to pursue its vision.

About expectations: some people will be delighted immediately and get hooked, but not all. We're all busy and adopting a new tool can feel like a leap of faith. For me, it has been worth it. Nushell has felt like planting a garden that gives back way more than you put into it.

I wrote up a quick gist [1] that shows how nice the experience is to write a new command (i.e. function) in Nushell.

[1]: "Building Argsort with Nushell" >>46528644

2. xpe+Wf[view] [source] 2026-01-07 17:13:30
>>raveni+(OP)
From an end-user point of view, there are some weirdnesses in Nushell, but they are rare in my experience. Here is one that gotcha'ed me:

    [1 2 3] | sum
The above does not return the sum (1 + 2 + 3 = 6). Why? Because `sum` is a *nix utility for returning the checksum. The way to do it in Nushell is:

    [1 2 3] | math sum
More info at [1]. Technically, this isn't Nushell's fault; it is just delegating to an external command.* Still, I found it confusing at first.

* Maybe it is time to rename `sum` to `checksum`!

[1]: https://github.com/nushell/nushell/discussions/17239

3. 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

9. ndsipa+8t[view] [source] 2026-01-07 18:02:36
>>raveni+(OP)
The example FOR loop in BASH is missing a trick to make it easier to read:

  for i in {1..10}; do
    echo $i
  done
(Though I prefer using printf than echo as it's more capable and POSIX compliant)

I write far too much stuff in BASH, but for me it's just not worth moving to using a different shell due to its ubiquity. There's also the question of "will this still run easily in 20 years". Of course, BASH is a nightmare for bugs and foot-guns unless you make a point of defensive coding (e.g. surround variables with double-quotes and using Shellcheck to point out common errors).

By the way, the article goes on to mention the large number of options to "ls". Don't try to parse the output of "ls" in scripts as there's better ways to do things: https://mywiki.wooledge.org/ParsingLs

18. fainpu+JC[view] [source] 2026-01-07 18:36:51
>>raveni+(OP)
My pet peeve with nushell: broken tables

https://github.com/nushell/nushell/issues/13601

https://github.com/nushell/nushell/issues/16379

◧◩
23. mmh000+NG[view] [source] [discussion] 2026-01-07 18:54:47
>>BadBad+Wo
I really would like a new shell that wasn't based on a poorly designed programming language from the 1960s[1][2]

However, I need to know sh/bash well because they're the tools installed by default; in any "well-established" organization, getting approval to install a new shell will range from "12 to 24 months" to "impossible". And without that, I'm not going to put in the effort to learn a new tool that is only useful some of the time and requires massive context switching.

[1] https://en.wikipedia.org/wiki/ALGOL_68 [2] https://en.wikipedia.org/wiki/Bourne_shell#:~:text=Stephen%2...

◧◩
25. Barrin+yI[view] [source] [discussion] 2026-01-07 19:01:44
>>maxloh+eA
well if you want a python/shell hybrid there's always xonsh (https://xon.sh/). Really great in particular for people like me who are bash-challenged. I do like Nushell too but I also always had problems remembering the actual language.
◧◩
27. kalter+gK[view] [source] [discussion] 2026-01-07 19:09:26
>>wpm+XC
Bash is an advanced beast. In Bourne, it was

    for i in `seq 10`
    do
        print $i
    done
Which is pretty much readable though. The only issue is Pascal vs C syntax. As a fan of the former, I admit that the latter is more advanced: it stacks better. E.g. consider

    if (test -f junk) rm junk
against

    if test -f junk; then rm junk; fi
The former “avoids semicolons that Bourne requires in odd places, and the syntax characters better set off the active parts of the command.” [1]

1: Rc—The Plan 9 Shell https://9p.io/sys/doc/rc.html

54. yencab+DW1[view] [source] 2026-01-08 01:01:46
>>raveni+(OP)
Last I looked, Nushell

- error handling is neglected in the basic design: <https://github.com/nushell/nushell/issues/10633>, <https://github.com/nushell/nushell/issues/10856>, <https://github.com/nushell/nushell/issues/8615>, <https://github.com/nushell/nushell/issues/6617>

- control-C interrupts its internals with obviously-wrong error: <https://github.com/nushell/nushell/issues/8828>, is mishandled in other ways <https://github.com/nushell/nushell/issues/8206>

These bugs have existed for so many years I've 100% given up on Nushell. I recommend you don't subject yourself to software that is this level of unreliable and unbothered about being so unreliable.

(There's a lot of missing/misimplemented features, but the above is so severe they're not even worth mentioning.)

◧◩
59. joemcc+GW2[view] [source] [discussion] 2026-01-08 10:32:38
>>yencab+DW1
FWIW it looks like this addresses the pipe error behavior: https://github.com/nushell/nushell/pull/16449
◧◩
66. xpe+Od9[view] [source] [discussion] 2026-01-10 07:24:53
>>yencab+DW1
Looks like https://github.com/nushell/nushell/pull/13515 fixes https://github.com/nushell/nushell/issues/8206.
[go to top]