4 ms·
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 Th
by xpe 9mo ago
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 https://github.com/nushell/nushell/discussions/17239