logoalt Hacker News

0x3444ac53last Wednesday at 2:23 PM4 repliesview on HN

I've tried nushell and other shell replacements and it just feels like I'm learning a new programming language for no good reason


Replies

ectosphenolast Wednesday at 3:46 PM

To be fair the example above is easier to remember than:

  ls -l --sort=size | head -n 5 | tail -n 4 | awk '{print $5 " = " $9}' | numfmt --to iec | jq --raw-input --null-input 'inputs | gsub("\r$"; "") | split(" = "; "") | select(length == 2) | {"s": (.[0]), "n": .[1]}'
show 2 replies
bbkanelast Wednesday at 3:15 PM

Yeah... https://www.sophiajt.com/case-for-nushell/ makes a really good case for Nushell as an alternative to Bash.

Unfortunately, I don't think Nushell brings much benefit for folks who already know Bash enough to change directories and launch executables and who already know Python enough to use more complicated data structures/control flow/IDE features

I'm still rooting for Nushell as I think its a really cool idea.

show 1 reply
fainpullast Wednesday at 3:02 PM

Ok if it's not for you. But there is of course a very good reason — work with objects in the pipeline instead of "dumb text". Also PowerShell and nushell are quite nice to learn, whereas Bash is absolutely horrible.

show 1 reply
IshKebablast Wednesday at 3:48 PM

Well, the reason is you can stop using Bash. If you never write Bash scripts already then you probably don't need it (and also congratulations on doing things right), but most people at least have lazy colleagues that write shell scripts. One day I'd like them to be not awful.