2 ms·
About the only common case for single line commands is that fish uses (cmd) instead of $(cmd) for subshells. Anything longer than that you should probably be pa
by kstrauser 1y ago
About the only common case for single line commands is that fish uses (cmd) instead of $(cmd) for subshells. Anything longer than that you should probably be pasting it into a file and executing that.
- kstrauser 1y agoReplying to myself: I don’t get the downvotes here. One-liner Bash commands I stumble across almost always work as-is in Fish. A while back they added support for FOO=bar cmd to run cmd with the env var FOO set to bar, and that was the single biggest incompatibility I routinely stumbled across. Most commands you find in random docs tend to be that simple, and most work just as if you’d run them under Bash. But if it’s a large, complex command with if statements and for loops, etc., you’re better off pasting it into a file, then tweaking it to run under Fish or just running it directly via Bash.