5 ms·
Though I've really grown toward the 'everything as a function' pattern that Fish is trying to do, this is definitely a step back in the right direction. I might
by aequitas 8y ago
Though I've really grown toward the 'everything as a function' pattern that Fish is trying to do, this is definitely a step back in the right direction. I might even wish for `$()` to be supported as well to allow even better copy pastable oneliners from Bash.
- OJFord 8y agoI thought it was to be included in 3.0, there's certainly an issue on it.
- e12e 8y agoYour quoting is a bit confusing, as "`cmd...`" and "$(cmd...)" are similar,, while backtick-dollar-paranthesis is just asking for trouble... ;) I take it fish didn't / doesn't support either?
- sitharus 8y agoFish uses parentheses for command expansion, so backticks aren’t supported and the dollar sign is only for variable substitution.
- ElijahLynn 8y agoFish just uses (cmd), no $.
- e12e 8y agoAh, which I guess is why no subshell support?
- cormacrelf 8y agoThere are other ways to do subshells than using the same syntax, just that the Fish developers never did it, maybe because it's not requested enough. I think it's still the most annoying thing about Fish, and the most convincing reason to switch away again. I frequently drop into bash to do (cd subdirectory && command --that might.fail) && run --command-in-original-dir --only-if-subshell-succeeded ... and expect to still be in the original dir when it's done. Any solution in Fish using "&& cd -" at the end of a block AFTER a maybe-failing command is just wrong, and there seriously isn't any way except saving and restoring $PWD every time you want subshell functionality, or using "; cd -" and manually saving the $status, which is equally as frustrating. There are some non-syntactic suggestions in https://github.com/fish-shell/fish-shell/issues/1439 https://github.com/fish-shell/fish-shell/issues/1439
- aequitas 8y agoSorry for the confusion, I'm to used to `` as code style for markdown, forgot HN doesn't support it. I'm glad Fish doesn't support the backtick syntax :). Like others mention it just drops the dollar from a 'regular' parenthesis expansion.