http://www.oilshell.org/blog/2020/02/recap.html#fish-oil-is-...
Another option is to link Oil as a C++ library into another shell, which is starting to become possible. Oil handles all the difficult language and compatibility issues, and encapsulates them, so it's a great complement to someone who only wants to work on the interactive shell.
Even though it cleans up many legacy warts, Oil runs thousands of lines of real bash programs: https://github.com/oilshell/oil/wiki/Shell-Programs-That-Run...
Posts on the interactive shell: https://www.oilshell.org/blog/tags.html?tag=interactive-shel...
I fix what I can, but it's like mopping up water during a rainstorm. Yes it's better than doing nothing, but also there will be more in twenty minutes so don't make any plans.
Have a scripts directory in my repo that mixes shell and python scripts with no file extensions and executable bits set. If I don't put a shebang, it just doesn't run.
Of course, this requires you to have firm control of code style policies.
It would be bad.
Fish imho offers superb usability, wouldn't want to miss it.
Fish does this in some cases:
~> echo $(true)
fish: $(...) is not supported. In fish, please use '(true)'.
echo $(true)
^
> (I recognize not all commands can be translated, but all of those that would be run by a beginner can be)Not all of them, unfortunately.
Consider `while true; do something; done`. Fish interprets this as an unclosed while loop, where `do` and `done` are ordinary commands. So if you enter it you don't get a syntax error, fish just waits for more input until you enter `end`. The same goes for `if` and `for`.
On the error messages, I was thinking even clearer for beginners, giving them the whole statement, to avoid uncertainties around where the quotes should be included in '(true)'. Maybe even a shortcut to paste the corrected line in their terminal.
echo $(true)
^
fish: $(...) is not supported. In fish, please use '(true)', like:
echo (true)
Alt+r will insert this line in your terminal."Xerox Alto"
https://www.computerhistory.org/revolution/input-output/14/3...
Having grown through the UNIX adoption in the enterprise, it kind of feels ironic that nowadays bash is kind of seen as the UNIX shell, and in those days it was just one among many possibilities to configure on /etc/passwd
But Linux is the majority of the Unix-like market, so it (and therefore Bash) dominates.
I think it's fair to say "If it doesn't work in fish, just type `bash` to enter a bash shell and try again."
But what I do is I run fish manually on top of bash. If I have an issue, I just type exit and then try to paste the commands in again. Then when I am done I restart fish.
But I haven't managed to recommend it to beginners. There are so many bash instructions out there, and translating between bash and fish isn't easy for a beginner.
That's a great shame and missed opportunity, because beginners would in particular value a nice shell. The shell is often one of the harder tools to learn — e.g. I find beginners are more comfortable in a Jupyter Notebook than they are the shell.
I'm not sure whether there's a way of combining fish's ease of use with a notion of compatibility — maybe a "bash mode" for beginners, which accepts bash commands? Or error messages which return translated commands?
(I recognize not all commands can be translated, but all of those that would be run by a beginner can be)