Hacker News new | ask | show | jobs
by ComputerGuru 2768 days ago
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.

1 comments

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.

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.

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.