Live data from Hacker News

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

news.ycombinator.com

31–40 of 146 posts

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

#31

I personally use ZSH with Prezto, which makes it considerably better than vanilla ZSH. I've tried Nushell and it seems to work quite fine but it's really a different paradigm that makes you think of the data differently than *sh shells.

How does it compare to oh my zsh?

I transitioned from oh-my-zsh to prezto a few years back and really liked it. Equal or better in every way, sometimes much better (speed and customization in particular, prezto is fast and guides you to customize in maintainable ways)

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

#32
How about instead of changing the shell get more out from your existing one.

Starship [0] and fzf [1] will make your life much easier in any shell.

I use fish but they work with bash, zsh and the like.

[0] https://starship.rs/

[1] https://github.com/junegunn/fzf

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

#33

I personally use ZSH with Prezto, which makes it considerably better than vanilla ZSH. I've tried Nushell and it seems to work quite fine but it's really a different paradigm that makes you think of the data differently than *sh shells.

How does it compare to oh my zsh?

I used ohmyzsh but it somehow got slow, so i switched to zpretzo. It didn't get slow. So that's my comparison :)

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

#34

Earlier quoted context omitted.

I use fish too. My favourite feature is typing part of a command and using up and down arrows to cycle through the results, as opposed to ctrl+R and...I don't remember which one. Functions are easy to define too.

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

Not wrong, but fish is so nice because it just works without any configuration. Sane defaults are a blessing.

I just checked and the only things I have configured are `set fish_greeting` (i.e. empty) and some paths...

Edit: Also, I don't know how, but the fish completion is magic. It seems to remember which commands I use often in which folders and in which order. I'm not sure if that's how it's implemented. Sure feels that way though.

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

#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 get properly executed using that other shell…

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

#37

Earlier quoted context omitted.

I use fish too. My favourite feature is typing part of a command and using up and down arrows to cycle through the results, as opposed to ctrl+R and...I don't remember which one. Functions are easy to define too.

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

Nice to know!

Nonetheless, what moved me from bash to fish was having this as granted. Now I worry only about specific higher-level functions. Also hunting each of these optimizations distracts me from my task at hand.

There's other stuff as well, for instance I'm abusing `for` iterations a lot more to run the same command for lists of things. Using bash before was less ergonomic and painful.

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

#38
I’ve used fish for years at work but that’s mostly a personal choice similar to your preferred editor. It’s more productive, but nobody else really sees it.

What’s helped a lot more has been replacing shell scripts with Python once they hit a certain complexity level. Huge reduction in code size, better functionality (e.g. it’s trivial to have good CLI argument parsing so people actually add it), and every time a large bash script has been converted some set of error-handling bugs has been fixed.

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

#39

Earlier quoted context omitted.

I use fish too. My favourite feature is typing part of a command and using up and down arrows to cycle through the results, as opposed to ctrl+R and...I don't remember which one. Functions are easy to define too.

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

You need to restart bash to make this work. Cool.
Post reply on HN