Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Tips & Traps

  1. Configuration files of the fish shell are located at ~/.config/fish.

Installation & Configuration

icon makes it easy to install and configure the fish shell.

icon fish -ic

Key Bindings

Use the built-in function fish_key_reader to tell you how to bind shortcuts.

ShortcutsDescription
Alt-.Get parameter of previous commands.
Alt-e or Alt-vEdit the current command line in an external editor.

Please refer to Interactive use for a more comprehensive list of key bindings.

Globbing / Wildcard Matching

Fish only supports the * and ** glob as syntax. The ? glob has been deprecated and is supported in newer version of fish. For more details, please refer to Fish Documentation - Wildcards (Globs) .

Linting Tools for Fish Scripts

The fish shell provides built-in tools for lingting.

Completions

  1. The built-in fish function fish_update_completions updates completions using manual pages.

  2. Instead of writing completion scripts manually, lots of tools support exporting completion scripts for bash, zsh, fish, etc.

    • command-line applications developed using cobra (GoLang)

      • docker completion fish > ~/.config/fish/completions/docker.fish

      • icon completion fish > ~/.config/fish/completions/icon.fish

  3. crazy-complete helps generate completion scripts based on YAML defined completion rules.