# Shell
## Comparisons
- Bash
- Traditional, widely available.
- Slow.
- Lacking in interactive features.
- [[zsh|Zsh]]
- Default on macOS.
- Modern, feature rich.
- More powerful scripting syntax than Bash.
- Dash
- Fastest and minimal.
- Focused on POSIX compliance, not interactive use.
- Best for non-interactive scripts.
- [[fish|Fish]]
- User-friendly, not POSIX compliant, more ergonomic.
- Best for interactive use.
- [Ion Shell](https://doc.redox-os.org/ion-manual/), written in Rust, claimed to
be faster than `dash`
> [!INFO]
>
> The benchmark on my MacBook Pro M3 Pro demonstrates that `fish` is the
> fastest overall, even compared to `dash` and `mksh`.
## Snippets
```sh
# Batch copy and substitute file name.
for f in good*.bminor; do cp "$f" "${f//good/bad}"; done
```
## Shell Prompt
- [[powerline|Powerline]], and [[powerlevel10k|Powerlevel10k]].
- [Starship](https://starship.rs/), cross platform and customizable, written in
[[rust|Rust]], successor of _Spacefish_, a Fish implementation of Spaceship.
- [Spaceship](https://spaceship-prompt.sh/), for [[zsh|Zsh]] only.
## Tools
- [Z](https://github.com/rupa/z), learns most used directories for `cd`. There's
port for [[fish|Fish]].
- [Zoxide](https://github.com/ajeetdsouza/zoxide) is a faster and more feature
rich alternative to `z`.