Fish shell is arguably the best interactive shell on Linux. Fastest startup, the best autosuggestions and syntax highlighting out of the box, zero configuration needed. But it's stayed niche for 20 years because it can't run bash syntax. Every Stack Overflow answer, every README install command, every tool config is written in bash.
Reef solves this. It's a Rust binary (~1.18MB) that intercepts bash syntax in fish and either translates it to fish equivalents or runs it through bash with environment capture.
Three tiers:
- Keyword wrappers handle `export`, `unset`, `source` (<0.1ms)
- AST translation converts `for/do/done`, `if/then/fi`, `$()` to fish (~1ms)
- Bash passthrough runs everything else through bash, captures env changes (~3ms)
Even the slowest path is faster than zsh's startup time with oh-my-zsh.
The migration path from bash/zsh to fish goes from "spend a weekend rewriting your config" to "change your default shell and go back to work."
❯ export PATH="/opt/bin:$PATH" # just works
❯ source ~/.nvm/nvm.sh # just works, env synced to fish
❯ unset MYVAR; echo ${MYVAR:-default} # just works
251/251 bash constructs pass in the test suite. Uses fish's public APIs, doesn't modify fish internals.
GitHub: https://github.com/ZStud/reef
AUR: yay -S reef
Happy to answer questions or take feedback. Breaking it is appreciated!
[link] [comments]
SOCIAL SHARE CARD GENERATOR