3 ms·
It's pretty common to copy-paste POSIX sh one-liners, or `source` a simple script. fish makes this annoying to do.
by emersion 5y ago
It's pretty common to copy-paste POSIX sh one-liners, or `source` a simple script. fish makes this annoying to do.
- shepherdjerred 5y agoI’ll trade the occasional minor annoyance for the day-to-day ease of use that fish provides
- KptMarchewa 5y agobash -c "PASTE_HERE"
- adrusi 5y agoThat's annoying when you have complex quoting in the pasted script, but you can always do bash PASTE_HERE exit Works for everything unless the pasted commands set variables you want to use.
- CGamesPlay 5y agoActually, in the last few years this gripe has gone away, at least for me. Once they added proper support for `VAR=val cmd && othercmd`, I haven't run across any one-liners that didn't work in fish.
- joshmanders 5y agoThe only issue I ran into this was when the one liners had subshell syntax $(cmd here), and all I had to do was convert $() to just ().
- mattgreenrocks 5y agoAFAIK that will be remedied in an upcoming release.
- ryenus 5y agoIndeed, the following should work with upcoming fish 3.4: echo "pwd: $(pwd)" See https://github.com/fish-shell/fish-shell/pull/8059 https://github.com/fish-shell/fish-shell/pull/8059
- joshmanders 5y agoOh awesome, Fish just keeps getting better and better!
- deleted 5y ago[deleted]