I, and others, use fish. Which is not POSIX compliant, and there are some necessary changes for the underlying logic to work. I have implemented a PR 683
Specific Bash/Zsh Incompatibilities with Fish Shell
Based on the bash scripts in Spec Kit, here are the critical areas that would fail catastrophically in Fish Shell:
- Variable Assignment Syntax
- Command Substitution Syntax
- Special Variables (
BASH_SOURCE, $$, etc.)
- Conditional Test Syntax
- Array Syntax
- Regex Matching with
BASH_REMATCH
- Error Handling (
set -e, set -u, set -o pipefail)
- Function Definition and Local Variables
eval with Output Capture
- Here Documents and String Output
- Arithmetic Expansion
- Source/Sourcing Scripts
- Argument Parsing
Summary: Why Fish Shell Support is Non-Trivial
These aren't minor syntax differences—they're fundamental incompatibilities requiring complete rewrites:
| Area |
Bash/Zsh |
Fish |
Complexity |
| Variable assignment |
VAR=value |
set VAR value |
High |
| Arrays |
arr=() arr+=(val) |
set arr; set -a arr val |
Very High |
| Conditionals |
[[ ]] |
test or string match |
High |
| Regex |
=~ with BASH_REMATCH |
string match -r |
Very High |
| Special vars |
$$, BASH_SOURCE |
$fish_pid, status filename |
Medium |
| Functions |
func() { } |
function func; end |
Medium |
| Error handling |
set -e -u -o pipefail |
Different model |
High |
I, and others, use fish. Which is not POSIX compliant, and there are some necessary changes for the underlying logic to work. I have implemented a PR 683
Specific Bash/Zsh Incompatibilities with Fish Shell
Based on the bash scripts in Spec Kit, here are the critical areas that would fail catastrophically in Fish Shell:
BASH_SOURCE,$$, etc.)BASH_REMATCHset -e,set -u,set -o pipefail)evalwith Output CaptureSummary: Why Fish Shell Support is Non-Trivial
These aren't minor syntax differences—they're fundamental incompatibilities requiring complete rewrites:
VAR=valueset VAR valuearr=() arr+=(val)set arr; set -a arr val[[ ]]testorstring match=~withBASH_REMATCHstring match -r$$,BASH_SOURCE$fish_pid,status filenamefunc() { }function func; endset -e -u -o pipefail