News for hackers. Stuff that matters.
Re:Ask HN: Best Command-Line Applications? by codychan on Monday November 19, 2018 @04:22AM (#18485088)
Re:Ask HN: Best Command-Line Applications? by vanderZwan on Monday November 19, 2018 @07:21AM (#18485879)
I love fish-shell, but after years of using it I switched to Oh My ZSH!. The bash compatibility makes it a whole lot easier to use when you're the type of person who has to look up "how to do X on the command line" on the internet more often than you'd like to admit (that would be me).

https://ohmyz.sh/

Re:Ask HN: Best Command-Line Applications? by bfrydl on Monday November 19, 2018 @09:57AM (#18486826)
But the whole reason I use fish is because I DON'T have to look things up on the internet because it uses sane syntax instead of some arcane combination of brackets, symbols, and the word “if” spelled backwards.
Re:Ask HN: Best Command-Line Applications? by ComputerGuru on Monday November 19, 2018 @08:19PM (#18491165)
fwiw, we are shipping a number of features in fish 3.0 (any day now!) that are specifically targeting at maximizing compatibility with most bash scripts (still not POSIX).

That includes support for && and || and a few other things that should go a long way towards making most code you find drop-in ready.

Re:Ask HN: Best Command-Line Applications? by explainplease on Tuesday November 20, 2018 @12:11AM (#18491936)
Really? Doesn't that go against the stated fish design document and ridiculousfish's intention for fish?

I'm more concerned about making fish scripts work well than making fish run bash scripts. (Maybe fish 3.0 will improve that too.) I've tried to use fish for writing somewhat serious scripts several times, and I've always run into frustrating problems that sent me back to bash for scripting. Fish is an excellent interactive shell, of course.

Re:Ask HN: Best Command-Line Applications? by ComputerGuru on Tuesday November 20, 2018 @12:52AM (#18492047)
You can see the discussions on GitHub but @ridiculousfish authored that series of commits fwiw.

However with regards to your other matter, I personally just finished rewriting the job control code to close out a lot of long standing bugs affecting correctness and child process behavior in complicated scripting cases, and other members like @faho have done an amazing job fixing up some of the builtins and scripting-related improvements as well as putting in insane effort into the interactive behavior of the shell and its insane library of completions.

Try the current fish master builds and see how if fares. If you have any specific concerns, please file a GitHub issue. It’s an open source project and it can only succeed with the help of the entire community.

fwiw I find the sanity fish brings to process substitution with sane tokenization and automatic escaping of shell substitution output to be a huge boon to productivity over writing in (ba)sh. These days, my scripts are either written in ninja or bmake if they are rule/output driven or fish otherwise.

Re:Ask HN: Best Command-Line Applications? by explainplease on Tuesday November 20, 2018 @11:23PM (#18500140)
Thanks for the updates. I have contributed to related discussions on GitHub for several years, but I haven't been able to keep up with all the issues.

> fwiw I find the sanity fish brings to process substitution with sane tokenization and automatic escaping of shell substitution output to be a huge boon to productivity over writing in (ba)sh.

I completely agree, this is why I would much prefer to use fish for scripting when feasible. I'm glad to hear that the scripting is being improved.

Re:Ask HN: Best Command-Line Applications? by nil_pointer on Monday November 19, 2018 @08:38PM (#18491263)
I like using a different plugin manager with OMZ. https://github.com/tarjoilija/zgen

If you use a lot of addons, this can load up prompts faster without losing any OMZ goodness.

Re:Ask HN: Best Command-Line Applications? by dancek on Wednesday November 21, 2018 @06:01AM (#18501733)
I also love zgen and used to use some parts of OMZ with it. But after debugging weird issues a bunch of times and always finding a funny opinionated config in OMZ I changed everything to Prezto. Zgen supports Prezto natively.

FWIW, here's my .zshrc. https://github.com/dancek/dotfiles/blob/master/.zshrc

Re:Ask HN: Best Command-Line Applications? by CGamesPlay on Monday November 19, 2018 @10:26AM (#18487030)
A quick tip for anyone disparaging the compatibility of fish shell, since this has solved most of the interior concerns for me:

  # Bash:
  FOO=bar ./command
  # Equivalent in bash and fish:
  env FOO=bar ./command
Re:Ask HN: Best Command-Line Applications? by mxschumacher on Monday November 19, 2018 @08:35AM (#18486269)
have you tried https://github.com/oh-my-fish/oh-my-fish ? has been serving me well for years
Re:Ask HN: Best Command-Line Applications? by vanderZwan on Monday November 19, 2018 @08:55AM (#18486383)
It's mainly the bash compatibility - does Oh My Fish fix that problem?
Re:Ask HN: Best Command-Line Applications? by em-bee on Monday November 19, 2018 @09:28AM (#18486584)
that would rather defeat the point, since fish breaks compatibility by design, that's part of what i like about it.

i can however appreciate that breaking bash compatibility is not for everyone.

i mix use of bash and fish. but more often than not i find myself in a situation where i switch to fish because it makes some complex command easier, than the reverse.

greetings, eMBee.

Re:Ask HN: Best Command-Line Applications? by pxc on Monday November 19, 2018 @10:57AM (#18487267)
There are a few plugins you can use with oh-my-fish and similar tools, for example `fish-foreign-env`, which provide a command (`fenv`, in this case) which runs a given command in bash and then transfers environment variable changes to the fish environment from which it was called.

It's not bash compatibility, but it is good enough for one-offs and even for many scripts and tools that expect to be sourced in your dotfiles from bash.

Re:Ask HN: Best Command-Line Applications? by SAI_Peregrinus on Monday November 19, 2018 @02:43PM (#18489108)
The bass plugin[1] works well.

[1] https://github.com/edc/bass

Re:Ask HN: Best Command-Line Applications? by sfdgsdfg on Tuesday November 20, 2018 @02:37AM (#18492375)
I'm in the same boat as you. Also used Fish for several years and loved it, but there's some incompatibilities here and there (dont remember exactly what, I think it was difference in how to pipe streams vs bash/zsh). In the end i switched to zsh & oh-my-zsh and haven't run into issues since (made the switch maybe 6 years ago). I'm a heavy terminal user so this part I'm not experimenting with again.
Re:Ask HN: Best Command-Line Applications? by h1d on Monday November 19, 2018 @09:09AM (#18486475)
Same except using zplug.

I still use fish for scripting as its syntax is far more casual looking.

Re:Ask HN: Best Command-Line Applications? by lunchables on Monday November 19, 2018 @09:15AM (#18486503)
Great list. I recently switched from ranger to nnn and have been really happy. It's tiny and extremely fast:

https://github.com/jarun/nnn

Re:Ask HN: Best Command-Line Applications? by archon810 on Monday November 19, 2018 @08:42PM (#18491287)
Really happy to see tig in your list and so high in the list of comments. Definitely one of my favorites too.