Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My main criticism of nushell is that it seems to be more developed as a programming language than as a shell.

Looking at the bug tracker, someone asked 4 years ago how to separate multiple commands, as in `git pull; git push`.

It turns out, this is hard with nushell. At some point a ; syntax was added in nushell, but it is NOT the separator you expect. It's actually a strange cross between bash && and ;

    `echo a | grep b; echo ok` does NOT run the second command, so here nushell ; is like bash &&

    `false; echo ok` DOES runs the second command, so here nushell ; is a plain ;
There is no exact && equivalent. There is no || equivalent syntax at all. And the closest form of a plain bash ; I could find is |1; (piping into a constant value, which guarantees a 0 return code, so that ; will never fail)


which programming language doesn't allow multiple statements on one line? ok, there may be a few that strictly require linebreaks to start a new statement and lisp where everything is one huge statement with nested expressions. but not supporting this in a shell looks like a deal breaker.

the primary function of a shell is to execute a sequence of commands.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: