abbr(1)

NAME
abbr -- manage fish abbreviations

  Synopsis

abbr -a word phrase...
abbr -s
abbr -l
abbr -e word

  Description
abbr manipulates the list of abbreviations that fish will expand.

Abbreviations are user-defined character sequences or words that are replaced with longer phrases after they are entered. For example, a frequently-run command such as git checkout can be abbreviated to gco. After entering gco and pressing [Space] or [Enter], the full text git checkout will appear in the command line.

Abbreviations are stored using universal variables. You can create abbreviations directly on the command line, and they will be saved automatically. Calling abbr -a in config.fish will lead to slightly worse startup performance.

The following parameters are available:

•   -a WORD PHRASE or --add WORD PHRASE Adds a new abbreviation, where WORD will be expanded to PHRASE.

•   -s or --show Show all abbreviated words and their expanded phrases in a manner suitable for export and import.

•   -l or --list Lists all abbreviated words.

•   -e WORD or --erase WORD Erase the abbreviation WORD.

Note: fish version 2.1 supported -a WORD=PHRASE. This syntax is now deprecated but will still be converted.

  Examples

abbr -a gco git checkout

 Add a new abbreviation where gco will be replaced with git checkout.

abbr -e gco

 Erase the gco abbreviation.

ssh another_host abbr -s | source

 Import the abbreviations defined on another_host over SSH.