ScriptsApr 14, 2026·3 min read

fish — The Friendly Interactive Shell with Autosuggestions Built-In

fish is a command-line shell that prioritizes interactivity: autosuggestions from history, syntax highlighting as you type, smart tab completions generated from man pages, and sensible defaults — no configuration required.

TL;DR
fish is an interactive shell with autosuggestions, syntax highlighting, and smart tab completions from man pages — no configuration required.
§01

What it is

fish (Friendly Interactive Shell) is a command-line shell that prioritizes interactive usability. It provides autosuggestions from command history as you type, real-time syntax highlighting that colors invalid commands red, and tab completions auto-generated from man pages. Everything works immediately after installation with no configuration files to edit.

fish targets developers and system administrators who spend significant time in the terminal. It replaces bash or zsh as your daily interactive shell while keeping a clean scripting syntax with proper if/for/while blocks.

§02

How it saves time or tokens

fish eliminates the need for shell plugin managers like Oh My Zsh. Autosuggestions mean you rarely type full commands twice. Tab completion reads actual man pages to offer relevant flags and options without memorization. The web-based configuration UI (fish_config) lets you customize colors and prompts without editing dotfiles. Universal variables persist across all terminal sessions automatically.

§03

How to use

  1. Install fish via your package manager: brew install fish on macOS or sudo apt install fish on Ubuntu/Debian.
  2. Run fish to start an interactive session, or set it as your default shell with chsh -s /opt/homebrew/bin/fish.
  3. Start typing commands and accept autosuggestions with the right arrow key. Use Tab for completions.
§04

Example

# Install on macOS
brew install fish

# Set as default shell
echo /opt/homebrew/bin/fish | sudo tee -a /etc/shells
chsh -s /opt/homebrew/bin/fish

# fish features in action:
# Type 'git com' -> autosuggests 'git commit -m' from history
# Type 'curl --' -> Tab shows all curl flags from man page
# Type 'nonexistent-cmd' -> highlighted red (command not found)

# Web-based config
fish_config
§05

Related on TokRepo

§06

Common pitfalls

  • fish is not POSIX-compatible by design. Bash scripts with [[ ]] or $() syntax need bash -c to run. This is a deliberate tradeoff for cleaner interactive syntax.
  • Setting fish as your login shell can break system scripts that expect POSIX sh. Some users prefer launching fish from their .bashrc instead of changing the login shell.
  • fish abbreviations (abbr) are different from aliases. Abbreviations expand visually as you type, while aliases are simple function wrappers. Use abbreviations for frequently typed commands.

Frequently Asked Questions

Is fish compatible with bash scripts?+

No. fish uses its own syntax that is not POSIX-compatible. Bash scripts should be run with `bash script.sh` or `#!/bin/bash` shebangs. fish is designed as an interactive shell, not a scripting replacement for bash.

How do fish autosuggestions work?+

fish suggests commands from your command history as you type. The suggestion appears as gray text after your cursor. Press the right arrow key to accept the full suggestion, or Alt+right to accept one word at a time.

Can I use Oh My Zsh plugins with fish?+

No. fish has its own plugin ecosystem. Fisher and Oh My Fish are the popular plugin managers. Many zsh plugin equivalents exist for fish, including git abbreviations, directory jumping, and prompt themes.

How does fish tab completion compare to zsh?+

fish generates completions automatically from man pages without configuration. zsh requires manual completion setup or plugins. fish completions also show descriptions alongside each option, making flag discovery faster.

Does fish work with tmux and other terminal tools?+

Yes. fish works in any terminal emulator and with tmux, screen, and similar tools. The syntax highlighting and autosuggestions function identically in multiplexed sessions.

Citations (3)
  • fish GitHub— fish provides autosuggestions, syntax highlighting, and tab completions from man…
  • fish Documentation— fish shell interactive features and scripting syntax
  • fish Official Site— Command-line shell comparison and interactive features

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets