|
|
|
|
|
by ronjouch
2851 days ago
|
|
The literally billions of POSIX-compliant scripts and tools already out there will run just fine under fish with a hashbang/shebang (a first line that defines what the file executed should be opened with, e.g. `/usr/bin/env sh`) :) . And it's not as if adding a hashbang was painful, not having one is super bad anyway as it leads to uncertainty of whether the script is bash / sh / etc, and can lead to tricky corner cases. I was a wary zsh user too, until I moved my zsh aliases to scripts with a proper hashbang, then migration to fish was painless, and the benefits are real: I get all the features I expected from my long-tuned zsh, with none of the maintenance/performance pains. Actually, even for one-time personal scripts I still default to writing (ba)sh, because 1. habit/competence, 2. shellcheck, 3. what you say: examples and resources are everywhere. Tangentially, upcoming fish will support POSIX && and || (in addition to maybe-even-weirder `; and` / `; or`), and already does if you build from sources now. |
|