Live data from Hacker News

Ask HN: Are alternative (oil, nu, etc.) shells usable as daily drivers?

news.ycombinator.com

71–80 of 146 posts

Re: Ask HN: Are alternative (oil, nu, etc.) shells usable as daily drivers?

#71

Earlier quoted context omitted.

You can easily get bash to do that by adding these lines to your .inputrc file. "\e[A": history-search-backward "\e[B": history-search-forward "\e[C": forward-char "\e[D": backward-char

Most things in fish can be achieved with customization and configuration in other shells, like zsh or bash. The point of fish is a sane set of defaults that doesn't require customization and is good enough.

Best feature of fish is the fact that my fish dotfiles are about 100loc max with a fully async prompt.

Comparable functionality in zsh would be 500loc of ultra obscure tweaks :)

Re: Ask HN: Are alternative (oil, nu, etc.) shells usable as daily drivers?

#72

I am still kinda bitter about mac os replacing the default bash with zsh. I gained nothing from that unwanted update, but got compatibility pains suddenly. Is something is more complicated than a one-liner, use a real programming language instead, with proper building blocks, tooling and documentation. Use something like Go to crosscompile if you don't want to depend on something on the host machine. In my experience…

I've watched a one line bash pipeline turn into a thousand line python program over the course of about a week. It didn't need new functionality, it was just not proper engineering to leave it in bash. We never did agree on whether that was right or not. It was something involving digging information out of elf binaries where the python libs were much more verbose than the flags passed to readelf (maybe objdump, it w…

[deleted]

Re: Ask HN: Are alternative (oil, nu, etc.) shells usable as daily drivers?

#74

I use `fish` as my main shell. It's closer to POSIX than eshell or oil, but it's definitely not POSIX. Personally, the main thing I like about it is that I can't copy paste bash commands. It forces me to read and understand and then convert. It also has some quality of life stuff I really like. I think next time I'm just going to go back to ZSH though as I feel I have learnt enough from the experience of using it tha…

Yup i've used fish too for many years because of it's excellent autocomplete. It's occasionally frustrating when you have to paste a bash command in, but if it doesn't work you can just spawn bash to run the command.

Re: Ask HN: Are alternative (oil, nu, etc.) shells usable as daily drivers?

#75
post #36

I'm using Fish for years, tried Nushell recently, but it didn't click for me. While I like the principle of data being more than just plain text, it probably was just too alien to me. A few here said they don't use Fish or another shell due to compatibility issues, but I wonder what the problem is: If I want to use a script written for another (POSIX) shell, it most likely has a shebang (or I can add it), so it will…

Mostly it's because you can't copy and paste stuff from blogs or Stack Overflow.

Re: Ask HN: Are alternative (oil, nu, etc.) shells usable as daily drivers?

#76

Earlier quoted context omitted.

You can easily get bash to do that by adding these lines to your .inputrc file. "\e[A": history-search-backward "\e[B": history-search-forward "\e[C": forward-char "\e[D": backward-char

Most things in fish can be achieved with customization and configuration in other shells, like zsh or bash. The point of fish is a sane set of defaults that doesn't require customization and is good enough.

If you want zsh that acts like fish, try "fizsh".

Re: Ask HN: Are alternative (oil, nu, etc.) shells usable as daily drivers?

#77
post #7

I'm a Linux native guy and I haven't hardly touched Windows in years but I still find myself curious about PowerShell. Is PowerShell even remotely suitable as a Linux shell? Is there any hope for PowerShell on Linux, it's an interesting take on shells.

nushell has a similar philosophy to PowerShell but without the strange command names. PowerShell is probably tied too deeply to Windows and .NET to be suitable as a Linux shell

PowerShell has strange command names? Compared to what? grep, sed, awk, and a bunch of two letter abbreviations from the before-times?

Re: Ask HN: Are alternative (oil, nu, etc.) shells usable as daily drivers?

#78
post #51

Nushell is great for simple tasks. i.e. ls **/data.json | each {|it| mv $it.name $"(dirname $it.name)/data.yml" } Will be much more complex in bash find -name "data.json" | xargs -i bash -c "mv \"{}\" \"\$(dirname '{}')/data.yml\"" Note the escaped quotes and dollar signs in bash. It is really difficult to get them right. In Nutshell we are actually using "functions" (supported syntax-wise) to do the job, so it will…

In zsh you can use:

  for f in **/data.json; mv $f $f:r.yaml
Which is even shorter, and easier. In bash you need a bit more syntax:

  for f in **/data.json; do mv $f ${f%.json}.yaml; done
That second example can probably also be simplified a lot in a similar fashion.

Re: Ask HN: Are alternative (oil, nu, etc.) shells usable as daily drivers?

#79

In the mid-90s, I used Byron Rakitzis' implementation of Plan 9's rc shell. I used it at work on SunOS 4.x. It was most excellent when I was able to have a meticulously-arranged, bespoke environment of startup and utility scripts around it. The scripting/programming language it incorporates is elegant, and simple, yet powerful, just like a utopian sort of environment envisioned by the Plan 9/Bell Labs folks. Chris Si…

I too used Byron's rc shell for many years. "Elegant, simple, and powerful" describes it well. I only gave it up as my daily driver after getting spoiled by ever improving bash tab completion at a time when rc didn't have it. Still use it for shell scripting when I don't want to deal with quoting hassles due to strings/filenames potentially containing white space.

Re: Ask HN: Are alternative (oil, nu, etc.) shells usable as daily drivers?

#80

I've been using nushell for the past year, and I love it. For a while I kept bash as my login shell and had nu as my default command in tmux. This had the advantage of allowing a bunch of environment setup to run in bash and get inherited, which allowed my overall setup to be more vanilla (and also nushell doesn't have any kind of job control, so something like tmux is probably a must). About two months ago I promote…

How is nushell for interactive use? Prompt configuration, stuff like that?

Also, how stable is it? Especially when interacting with weirder stuff like tmux, vim, ncurses apps?

Post reply on HN