Tools

fish shell explained: autosuggestions and completions

fish is a shell with autosuggestions, syntax highlighting and Tab completions built in. See how each one works, how to set it up and where it differs from bash.

  • 7 min read
  • 5 questions
  • +35 XP
Transcript

Fish, explained by cats. Kitty opens her terminal. The terminal is only the window. The shell is the program inside it. It reads what she types, and runs it. Bash is a shell. So is Z shell. And so is fish.

Same window. Different program. Most shells just wait for orders. Fish helps. No plugins. No setup. Kitty types two letters. Fish suggests the rest in grey, from her history. Right arrow, and it’s typed. A command that doesn’t exist turns red, before she presses enter.

She presses tab. Fish lists every option, and what each one does. It knows a thousand commands, and reads the man pages for the rest. She tells fish that gco means git checkout. Now she types gco, and fish writes the rest.

New colours? She types fish config, and picks them on a web page. But fish is not bash. Its scripting language is its own. So a line copied from the internet can fail. Fish even tells her how to fix it. That’s fish. The friendly interactive shell. And the only fish Kitty doesn’t eat.