Live data from Hacker News

GitHub – nushell/nushell: A new type of shell

github.com

351–360 of 411 posts

Re: GitHub – nushell/nushell: A new type of shell

#351

Need some description up front, not in the 5th section ("Philosophy" https://github.com/nushell/nushell#philosophy ). Some ideas: "powershell for unix", "structured pipes", "pre-parsed text", "small, useful, typed tools loosely coupled."

powershell for unix In general I really dislike "[some other product] for [a different use case]" . It might be accurate but many potential users might never have heard of PowerShell or if they have only have a vague idea of what it is.

I find it hard to believe that someone looking into alternative shells would have never heard of PowerShell. I get that Windows isn’t exactly most people’s OS of choice, but the existence of PowerShell is widely known.

Re: GitHub – nushell/nushell: A new type of shell

#352

On top of the nice approach to structured output with pipelines, the "cross-OS first" approach is amazing! Very cool to use a modern shell that can fit both Windows and Unix by design (and not through WSL), hell I'm going to try to introduce it to my small company as a standard tool. Hope it's not in a too immature stage, however it looks very shining and promising considering the enthusiast contributors community. I…

Funny enough, the new PowerShell fits this description too now that it’s packaged for Linux.

Re: GitHub – nushell/nushell: A new type of shell

#353
post #67

I played with it recently. The interactive part is limited at the moment, but I really like the idea of having operations like sorting and filtering separate from the tools which produce the data. Having these things consistent and available everywhere is a huge cognitive win. I can finally sort and filter `ls` output without having to read the man page. :) "Querying" data feels a lot like SQL in that respect.

Were you not able to before? ls | grep foo | sort is hardly something people normally read the man page for.

[deleted]

Re: GitHub – nushell/nushell: A new type of shell

#354

Earlier quoted context omitted.

Powershell is a pretty neat scripting language, especially if you manage Windows boxes or have lots of .net stuff around. It's not a good interactive shell environment though. The commands are way too verbose and the syntax feels clunky for keying in.

I disagree. Yes, the syntax is verbose so that you get sensical names instead of things like 'awk' and 'grep', but that isn't a big deal because a) tab complete[0], and b) user-definable aliases. [0] tab complete works on cmdlets, switches, and variables .

> [0] tab complete works on cmdlets, switches, and variables.

Isn't this how modern tab complete works everywhere? bash 5.1 (the shell I happen to be running right now, and which I mention because I think of its out-of-box tab completion as pretty basic) tab completes variables.

Re: GitHub – nushell/nushell: A new type of shell

#355
post #107

Thinking this is so cool! I was wondering if seriously buying into an alternate shell like this would be worth it in the long run. Would really love to read from people who use(d) an alternative shell, both success and failure stories. I cannot shake from my head the idea that buying into a non-standard shell will only work for personal projects in one's own workstation, but it won't fly too far for company work beca…

Perhaps someone already mentioned this elsewhere, but nothing forces you to use only a single shell. A shell, after all, is just a running process. Yoh can even launch it from another shell. As a GNU screen user already, I can imaginr having one of my default windows that load when I launch screen be nushell if I was so inclined. I can keep the rest as my default (e.g., bash or htop or whatever else I wany running th…

There is something very important that forces me to use a single shell: Habit.

Re: GitHub – nushell/nushell: A new type of shell

#356
post #37

I stopped reading at "rather than thinking of services and input as a stream of text", horrified. Why would we do that ? KISS !

By the same reasoning: Would you not use databases because they have a schema? or JSON...? Heck, even utf-8 could be too complicated.

You have a point. That sounded like pure conservatism, and to some extent it is. But still, text is simple and that what makes shell powerful, trying to move to higher level abstraction is has a chance to create fragmentation and break the solid foundations on which Unix is built.

Re: GitHub – nushell/nushell: A new type of shell

#357
post #37

I stopped reading at "rather than thinking of services and input as a stream of text", horrified. Why would we do that ? KISS !

Because parsing text is shit. Good luck AWK'ing everything. Datastreams are simple.

It's often better than trying to figure out the weird formats all the tool would use otherwise

Re: GitHub – nushell/nushell: A new type of shell

#358

Test it with Casey Muratori's benchmark: https://github.com/cmuratori/termbench Context: https://twitter.com/cmuratori/status/1401761848022560771

That program is for testing terminal emulators, not shells.

Ah, true. Got confused there.

Re: GitHub – nushell/nushell: A new type of shell

#359
post #327

Earlier quoted context omitted.

Yup. There are more shells than there are IDEs, keyboard switch types, keyboard layouts, and operating systems. Shell ideological wars get just as bad as emacs/vim and linux/Mac. Use whatever you want, but company IP is shbang'd to bash.

> shbang'd to bash. Good. Better: #!/bin/sh Best: #!/bin/sh and also not assuming bash anyway!

Oh and how /bin/bash is bash3 on macOS instead of the contemporary bash5 by default. And how sh is dash on Debian, or Ubuntu, I forgot. Some of the reasons why I would prefer python3 scripts (or perl) over sh or bash

Re: GitHub – nushell/nushell: A new type of shell

#360

Earlier quoted context omitted.

I haven’t seen a shell script in ages that was missing the shebang. Is this common in some places? I’ve started to write dash scripts because that seems to be reasonably posix and bash on macOS is ancient.

I don’t think I’ve ever seen a script written without the shebang. Btw, you can get around the ancient bash in macOS by installing a more modern bash and invoking with /usr/bin/env bash as your shebang. Not sure if that’s a great idea, mind you, but if you’re already writing scripts in something non-portable, it’s an option.

There are hundreds of sh files on github that don't have a shebang. Just because you don't write them and your colleagues don't doesn't mean they don't exist in the wild.
Post reply on HN