Live data from Hacker News

GitHub – nushell/nushell: A new type of shell

github.com

281–290 of 411 posts

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

#281
post #242
post #234

Earlier quoted context omitted.

Shellcheck is nowadays a must for writing decent shell scripts. it is like a centralized knowledge base of all those brilliant minds that did the sanity checking for you in the old days :)

It boggles my mind that people use a language where x = 0 doesn't work and x=$y is a security flaw

Sometimes it's easier to use tools you know will be available than to ensure your tool of choice will be available everywhere you need it to be. JavaScript, esp. pre v6, is another example that makes almost no sense when you ignore its ubiquity

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

#282

Earlier quoted context omitted.

I installed wsl on like 10 machines, including "newer laptops", and never had problems with the setup. Instead of solving your actual problem you created a whole new problem domain, that seems... not like the way to go

The "domain" I care about is for basic build scripts to work on Windows and Linux. Whichever way gets me back to regular work is the best way! I do not have the experience to debug when BoW or WSL do not work unfortunately.

while it can be a pain to deal with windows quirks, writing a wrapper script to deal with low level file IO stuff sounds like a good way to open a whole can of worms and irrevocably mess up your whole system

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

#283

What if we added json output mode to all shell commands? Or at least make some wrappers that parse their unstructured text output into json. We would be able to use standard pipelines and jq to filter/query outputs, without any custom shells. Just imagine: ifconfig --json | jq '.[] | [.interface, .inet] | @tsv'

You're not the first person to think of that. See Juniper's libxo: https://github.com/Juniper/libxo

It's integrated into a lot of FreeBSD's command line tooling, and is very useful, when it's available.

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

#284
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…

I'm generally supportive of the effort to replace the archaic shells that dominate the unix landscape, but unfortunately none have yet met my personal desires. It seems like a lot of the developers of these shells create them to supplement the common unix toolset, but I really want a complete replacement. Ideally, the shell itself would be a completely dependency-free static executable, with a built-in command set th…

FWIW, nushell is much more of this than it appears. While many commands share names with Unix commands, that is the only similarity for quite a few, since they are rewritten to return structured data instead of text.

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

#285

Earlier quoted context omitted.

If you're running scripts, what difference does it make that you use fish? You're not really supposed to write scripts for fish, unless it is meant to be used be the fish shell itself. A shebang on the top of your script will invoke the script with the right executable, and whether you called it from bash, zsh or fish would make no difference.

> You're not really supposed to write scripts for fish Given that 95% of my time in a shell is running a script, a shell that doesn't do that well isn't a great fit for me. > A shebang on the top of your script will invoke the script with the right executable, Assuming the person who wrote it had the foresight to do so. That person isn't always me, and if I have to manually check if each script I run has a shebang, I…

I would consider a person who doesn't use a shebang to be bad at their jobs.

Even the most basic of tutorials will include it even if it means nothing to the user.

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

#287

The title is somewhat misleading and makes it seem like this is a GitHub company initiative rather than a project just hosted on GitHub. I've not seen this title format on HN before. Could it be changed?

I think it is very likely "disagreement" in this thread is simply based on people seeing different titles at different times. There are some possible causes:

1. The submitter may provide an initial title

2. HN moderators may adjust the title

3. GitHub may show different titles based on the user's login status (I'm not sure myself, I'm writing this based on what I read in another part of this thread)

Therefore, I make this request of HN commenters: Since titles on HN can change, please quote the exact title that confuses you.

More broadly, it may be useful to always quote the text you are responding to.

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

#288
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…

I wouldn’t use a custom shell in company work, but I’d use it for company work. I treat custom shells like a custom keyboard or shortcuts in the OS. Shells can help a lot in your day to day command line ergonomics, like presentation (always know which branch and directory I’m on, time and time taken for commands) and ease of use (autocomplete, aliases, shortcuts). But I wouldn’t script into them for professional work…

I agree... and any well written script will have a shebang that specifies the shell that shluld run it, anyway.

For me, personally, I love having homogeneus systems put in place. In this case it means not having to switch my mind between in and for modes. Helps me avoid mistakes, having to keep less context up here. But it's always interesting to read about other people's way of working.

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

#289
post #214

there's fair amount of comments here (and in other similar posts) which read like: 'nushell is basically a powershell something' 'bash/zsh is better/worse than pwsh/etcshell' this is very unfair because pwsh allows control over of the all .NET/COM+ available in a system (well, .NET Core only on non-MS, but still). while nushell stands on its own shoulders or if u like - allows control of other programs executed, but…

@joseph8th mentioned a shell [1] earlier, that at least at first glance, seems to be a python + bash combination, similar to what powershell does with .net.

[1] https://xon.sh/

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

#290
post #264

I use this in combination with fish shell and it's been working really well. I can just switch over to `nu` when the task merits; no need to replace my current shell. I can also just run a one-off line like this. nu -c "ls | where size > 10b"

I see the value proposition of nushell. I'm wondering if I should also try fish.

May I ask if you switched to fish from zsh? What motivated your change?

Background: I invested some time not too long ago to read zsh docs in detail and customize my own configuration (e.g. instead of using oh-my-zsh). Since then, I've been quite happy with zsh. That said, I'm also open to switching to fish and/or nushell based on recommendations.

Post reply on HN