3 ms·
I don't think we are disagreeing. From the tutorial in the OP: "If you have a strong understanding of other shells, and want to know what fish does differently
by recuter 13y ago
I don't think we are disagreeing. From the tutorial in the OP:
"If you have a strong understanding of other shells, and want to know what fish does differently, search for the magic phrase unlike other shells, which is used to call out important differences."
"stdin and stdout can be redirected via the familiar < and >. Unlike other shells, stderr is redirected with a caret ^"
That's pretty, no argument there. But I already remember to count the std's from 0, so stderr is &2. Not as pretty, fish is nicer, no argument. But its not MUCH nicer, and I'm going to have to use &2 here and there in my life anyway...
So:
- fish has no dedicated syntax for setting variables
- fish does not have an export command
- fish stores the exit status of the last command in $status instead of $?.
- fish does not use backticks ` for command substitutions. Instead, it uses parentheses.. I'm pretty sure good bash form is $() these days, not backticks. So you're spared the dollar sign.
'etc 'etc. I agree we need something to leapfrog what we have but these changes, while nice improvements, seem minor. At least as far as I can see! That's why I asked. Maybe there's some more neat stuff that makes it a significant improvement.
- mixmastamyk 13y agoThe syntax highlighting is 90% of why I use it, everything else is gravy.
- anateus 13y agoI'm not sure what you mean about setting variables and export, because here's how I do it: set foo bar # sets foo to bar set -x foo bar # sets foo to bar and exports it to the environment