I know I could just invoke bash, but prefixing commands with "bash -c '" is tiring and papercuts are why I switched to fish in the first place. I wish bash had a sane auto-complete prediction like fish.
I know I could just invoke bash, but prefixing commands with "bash -c '" is tiring and papercuts are why I switched to fish in the first place. I wish bash had a sane auto-complete prediction like fish.
I use fish interactively and write very simple scripts in bash and the more complex in Python.
You need to learn a few idioms like: replace $[1+1] with (math "1+1"); replace
> for f in $(ls); do echo $f; done
with
> for f in (ls); echo $f; end
I should start a Rosetta Stone of Bashisms to Fishisms - I'd be interested if anyone has got Android Open Source build environment / lunch working.
If nothing else, I have thousands of lines of my own shell scripts that I don't care to move to a different shell syntax that's not obviously better :)
There are lots of posts on the blog about it, but here is an example:
"OSH Runs Real Shell Programs" - http://www.oilshell.org/blog/2017/07/02.html
Another comment: https://news.ycombinator.com/item?id=15916470
However one thing is that it's not yet a good interactive shell. It's mainly treating bash as a programming language. However I think that is a good foundation for an interactive shell. Some details here:
https://www.reddit.com/r/commandline/comments/7c3f9f/osh_02_...
"\e[A": history-search-backward # Up key
"\e[B": history-search-forward # Down key.
Allows you to get press up while you have `ssh 10.2` in the terminal to cycle through ips matching, etc. It won't display like in fish before pressing it, but I find that's a reasonable tradeoff.