Commands

This is a list of all the commands fish ships with.

Broadly speaking, these fall into a few categories:

Keywords

Core language keywords that make up the syntax, like

  • if for conditions.

  • for and while for loops.

  • break and continue to control loops.

  • function to define functions.

  • return to return a status from a function.

  • begin to begin a block and end to end any block (including ifs and loops).

  • and, or and not to combine commands logically.

  • switch and case to make multiple blocks depending on the value of a variable.

Decorations

Command decorations are keywords like command or builtin to tell fish what sort of thing to execute, and time to time its execution. exec tells fish to replace itself with the command.

Tools to do a task

Builtins to do a task, like

  • cd to change the current directory.

  • echo or printf to produce output.

  • set to set, query or erase variables.

  • read to read input.

  • string for string manipulation.

  • math does arithmetic.

  • argparse to make arguments easier to handle.

  • count to count arguments.

  • type to find out what sort of thing (command, builtin or function) fish would call, or if it exists at all.

  • test checks conditions like if a file exists or a string is empty.

  • contains to see if a list contains an entry.

  • abbr manages Abbreviations.

  • eval and source to run fish code from a string or file.

  • set_color to colorize your output.

  • status to get shell information, like whether it’s interactive or a login shell, or which file it is currently running.

  • bind to change bindings.

  • commandline to get or change the commandline contents.

  • fish_config to easily change fish’s configuration, like the prompt or colorscheme.

  • random to generate random numbers or pick from a list.

Known functions

Known functions are a customization point. You can change them to change how your fish behaves. This includes:

Helper functions

Some helper functions, often to give you information for use in your prompt:

Helper commands

fish also ships some things as external commands so they can be easily called from elsewhere.

This includes fish_indent to format fish code and fish_key_reader to show you what escape sequence a keypress produces.

The full list

And here is the full list: