FISH-INTERACTIVE(1) fish-shell FISH-INTERACTIVE(1) (NAME) fish-interactive - (DESCRIPTION) fish . . fish The fish Language <> . (HELP) fish . help <> . help syntax <#syntax> . fish (man) man . man set set . -h . fg <> fg -h help fg . help index ( help) man fish-doc . help tutorial man fish-tutorial . (AUTOSUGGESTIONS) fish . ( fish_color_autosuggestion ). ( ) right (->) ctrl-f . alt-right (->) alt-f . : . . . $fish_autosuggestion_enabled 0 : set -g fish_autosuggestion_enabled 0 (TAB COMPLETION) . tab fish . . ( "pager") . pageup / pagedown tab shift-tab . ctrl-s ( pager-toggle-search - / vi) . fish . . -l ls . : o man whatis . o make Makefile . o mount fstab . o apt rpm yum . . (Writing your own completions) <> . <#syntax-function-autoloading>. $fish_complete_path <#variables-lists> $fish_function_path . ~/.config/fish/completions/.fish fish . (SYNTAX HIGHLIGHTING) fish . . . : o . o . o . o . . fish fish_config <> . fish_config fish_config theme fish : # fish_config theme choose none # fish_config theme choose default : fish_config theme show config.fish <#configuration> (event handler) <#event> : function apply-my-theme --on-variable=my_theme fish_config theme choose $my_theme end (universal variable) <#variables-universal> : > set -U my_theme lava > set -U my_theme snow-day (Syntax highlighting variables) fish . set_color <> . set_color --foreground= --background= --bold --dim --italics --reverse --strikethrough --underline --underline-color= . : (bold) : set fish_color_error red --bold fish : +---------------------------+--------------------------------------+ | | | | | | +---------------------------+--------------------------------------+ |0.0 fish_color_normal | | |168u | | +---------------------------+--------------------------------------+ |0.0 fish_color_command | | |168u | echo | +---------------------------+--------------------------------------+ |0.0 fish_color_builtin | | |168u | cd | | | set - | | | | | | | | | | +---------------------------+--------------------------------------+ |0.0 fish_color_function | | |168u | | | | - | | | | | | | | | | | | | +---------------------------+--------------------------------------+ |0.0 fish_color_keyword | | |168u | if - | | | | | | | | | | | | | +---------------------------+--------------------------------------+ |0.0 fish_color_quote | | |168u | | | | "abc" | +---------------------------+--------------------------------------+ |0.0 | | |fish_color_redirection | / | |168u | >/dev/null | +---------------------------+--------------------------------------+ |0.0 fish_color_end 168u | | | | ; | | | & | +---------------------------+--------------------------------------+ |0.0 fish_color_error | | |168u | | +---------------------------+--------------------------------------+ |0.0 fish_color_param | | |168u | | +---------------------------+--------------------------------------+ |0.0 fish_color_valid_path | | |168u | | | | | | | | | | ( | | | | | | ) | +---------------------------+--------------------------------------+ |0.0 fish_color_option | | |168u | "-" | | | | | | | | | "--" | +---------------------------+--------------------------------------+ |0.0 fish_color_comment | | |168u | '# important' | +---------------------------+--------------------------------------+ |0.0 fish_color_selection | | |168u | | | | | | | vi | +---------------------------+--------------------------------------+ |0.0 fish_color_operator | | |168u | | | | * ~ | +---------------------------+--------------------------------------+ |0.0 fish_color_escape | | |168u | \n | | | \x70 | +---------------------------+--------------------------------------+ |0.0 | | |fish_color_autosuggestion | ( | |168u | | | | | | | ) | +---------------------------+--------------------------------------+ |0.0 fish_color_cwd 168u | | | | | | | | | | | +---------------------------+--------------------------------------+ |0.0 fish_color_cwd_root | | |168u | | | | | | | | | | | +---------------------------+--------------------------------------+ |0.0 fish_color_user 168u | | | | | | | | +---------------------------+--------------------------------------+ |0.0 fish_color_host 168u | | | | | | | | +---------------------------+--------------------------------------+ |0.0 | | |fish_color_host_remote | | |168u | | | | | | | ( | | | ssh) | +---------------------------+--------------------------------------+ |0.0 fish_color_status | | |168u | | | | | | | | | | | +---------------------------+--------------------------------------+ |0.0 fish_color_cancel | '^C' | |168u | | | | | +---------------------------+--------------------------------------+ |0.0 | | |fish_color_search_match | | |168u | | | | | | | | | | ( | | | ) | +---------------------------+--------------------------------------+ |0.0 | | |fish_color_history_current | | |168u | | | | | | | dirh cdh | +---------------------------+--------------------------------------+ --theme=THEME fish $fish_color_normal : o $fish_color_builtin $fish_color_function $fish_color_command . o $fish_color_keyword $fish_color_command . o $fish_color_option $fish_color_param . o $fish_color_valid_path (modifiers) $fish_color_param. . (Pager color variables) fish (pager) . : : set fish_pager_color_background --background=white : set fish_pager_color_prefix black set fish_pager_color_completion black set fish_pager_color_description black set fish_pager_color_background --background=white set fish_pager_color_secondary_background --background=brwhite : +---------------------------------------+-----------------------------------+ | | | | | | +---------------------------------------+-----------------------------------+ |0.0 fish_pager_color_progress 168u | | | | | | | | +---------------------------------------+-----------------------------------+ |0.0 fish_pager_color_background 168u | | | | | | | | +---------------------------------------+-----------------------------------+ |0.0 fish_pager_color_prefix 168u | | | | | | | | | | | | | | | | | +---------------------------------------+-----------------------------------+ |0.0 fish_pager_color_completion 168u | | | | | | | | | | | | | | | | | +---------------------------------------+-----------------------------------+ |0.0 fish_pager_color_description | | |168u | | +---------------------------------------+-----------------------------------+ |0.0 | | |fish_pager_color_selected_background | | |168u | | +---------------------------------------+-----------------------------------+ |0.0 fish_pager_color_selected_prefix | | |168u | | | | | +---------------------------------------+-----------------------------------+ |0.0 | | |fish_pager_color_selected_completion | | |168u | | +---------------------------------------+-----------------------------------+ |0.0 | | |fish_pager_color_selected_description | | |168u | | +---------------------------------------+-----------------------------------+ |0.0 | | |fish_pager_color_secondary_background | | |168u | | | | | +---------------------------------------+-----------------------------------+ |0.0 fish_pager_color_secondary_prefix | | |168u | | | | | | | | +---------------------------------------+-----------------------------------+ |0.0 | | |fish_pager_color_secondary_completion | | |168u | | | | | +---------------------------------------+-----------------------------------+ |0.0 | | |fish_pager_color_secondary_description | | |168u | | | | | +---------------------------------------+-----------------------------------+ secondary selected $fish_pager_color_selected_background $fish_color_search_match . (ABBREVIATIONS) git checkout abbr <> gco . abbr -a gco git checkout gco space () enter gco git checkout . gco ctrl-space [1]. . : function multicd echo cd (string repeat -n (math (string length -- $argv[1]) - 1) ../) end abbr --add dotdot --regex '^\.\.+$' --function multicd .. cd ../ ... cd ../../ .... cd ../../../ . (aliases) . [1] expand-abbr execute <> . ctrl-space . (PROGRAMMABLE PROMPT) fish ( ) (prompt) . : you@hostname ~> fish_prompt <> fish_right_prompt <> . . vi fish_mode_prompt <> . fish_transient_prompt <#envvar- fish_transient_prompt> 1 fish --final-rendering . fish fish_config <> . fish_config [2] . fish_config prompt show . fish_config prompt choose disco "disco" . fish_config prompt save . funced fish_prompt funcsave fish_prompt ( fish_right_prompt ). [2] . (CONFIGURABLE GREETING) fish fish_greeting <> . fish_greeting . $fish_greeting (universal variable) <#variables-universal>: set -U fish_greeting (global) <#variables-scope> config.fish <#configuration> : set -g fish_greeting 'Hey, stranger!' : function fish_greeting random choice "Hello!" "Hi" "G'day" "Howdy" end config.fish <#syntax-function-autoloading> . funced <> funcsave <> . (PROGRAMMABLE TITLE) . fish fish_title <> . . status current-command <> ( fish ) fish_title <> . . ssh ( fish ) . . : : function fish_title # `prompt_pwd` . . echo $argv[1] (prompt_pwd) pwd end (COMMAND LINE EDITOR) fish . bash fish : Emacs vi. Emacs . fish_vi_key_bindings <> vi fish_default_key_bindings <> . fish_key_bindings . : function fish_hybrid_key_bindings --description \ "Vi-style bindings that inherit emacs-style bindings in all modes" for mode in default insert visual fish_default_key_bindings -M $mode end fish_vi_key_bindings --no-erase end set -g fish_key_bindings fish_hybrid_key_bindings fish . fish ( alt-e). (Shared bindings) Emacs vi vi/Vim . o tab . shift-tab . tab ctrl-i . o left (<-) right (->) . right (->) . o enter ( ) end ) . o alt-enter . . o alt-left (<-) alt-right (->) . / . alt-right (->) ( alt-f) . o ctrl-left (<-) ctrl-right (->) . ( ). o shift-left (<-) shift-right (->) . . o up (^) down (v) ( ctrl-p ctrl-n ) / . . . o alt-up (^) alt-down (v) / . . o ctrl-c (SIGINT). o ctrl-d . ctrl-d fish . o ctrl-u (killring) . o ctrl-l (scrollback) . o ctrl-w ( "/" ":" "@") . o ctrl-x ctrl-v ( fish_clipboard_copy <> fish_clipboard_paste <> ). o alt-d (Kill Ring) . o ctrl-delete ( macOS) . o alt-d . o alt-delete ( macOS) . o shift-delete . o alt-h ( f1) . o alt-l . o alt-o . . $VISUAL $EDITOR . o alt-p &| less; . PAGER less . o alt-w . o alt-e . $VISUAL $EDITOR . o alt-v alt-e . o alt-s sudo . sudo . sudo doas please run0 . o ctrl-space . vi . (Emacs mode commands) Emacs fish_default_key_bindings <> . . o home ctrl-a . o end ctrl-e . end ctrl-e . o ctrl-b ctrl-f left (<-) right (->) ( ). o alt-b alt-f . / . o ctrl-n ctrl-p / . o delete backspace ctrl-h . o alt-backspace ctrl-backspace . o alt-< alt-> . o ctrl-k (Kill Ring) . o escape ctrl-g . (undo) . o alt-c (capitalize) . o alt-u . o ctrl-t . o alt-t . o ctrl-z ctrl-_ ( ctrl-/) (undo) . o alt-/ ctrl-shift-z (redo) . o ctrl-r . . ctrl-r ctrl-s . . bind <> . (Vi mode commands) vi vi . (insert mode) . escape (command mode) . . vi Emacs . vi fish_vi_key_bindings <> . Emacs vi : function fish_user_key_bindings # fish_default_key_bindings -M insert # vi . # --no-erase fish_vi_key_bindings . # (insert "default" visual). fish_vi_key_bindings --no-erase insert end vi fish_mode_prompt <> . (override) . ( ) fish_default_mode_prompt . ( ) . fish_prompt fish_mode_prompt ~/.config/fish/functions/fish_mode_prompt.fish. ( repaint-mode bind <> ). fish_vi_cursor . vi : # vim # (block) set fish_cursor_default block # (line) set fish_cursor_insert line # (underscore) set fish_cursor_replace_one underscore set fish_cursor_replace underscore # . . # fish_cursor_external fish_cursor_default . set fish_cursor_external line # # fish_cursor_default set fish_cursor_visual block blink . fish "block" () "line" () "underscore" ( ) . . (Command mode) (normal mode) . o h . o l . o k j / . . . o i . o I . o v . o a . o A . o o . o O ( ) . o 0 () ( ). o d,d (Kill Ring) . o D . o p . o u (undo) . o ctrl-r (redo) . o [ ] / . o / . ctrl-s . o backspace . o g,g / G . o ~ . o g,u . o g,U . o :,q fish . (Insert mode) o escape . o backspace . o ctrl-n . (Visual mode) o left (``<-`) right`(``->`) . o h . o l . o k . o j . o b w . o d x (Kill Ring) . o escape ctrl-c . o c s . o X . o y . o ~ / . o g,u . o g,U . o ",*,y . (Custom bindings) bind <> : # ``^C`` bind ctrl-c cancel-commandline bind config.fish <# configuration> fish_user_key_bindings . fish () : bind --erase ctrl-c fish . . vi bind . : bind --mode insert ctrl-c 'commandline -r ""' (Key sequences) fish_key_reader <> . > fish_key_reader # Alt + Press a key: bind alt-right 'do something' ( fish) . ctrl-i ctrl shift . fish . fish_key_reader fish . . escape alt . escape alt ( ) fish escape . fish_escape_delay_ms <#envvar-fish_escape_delay_ms> . escape alt+ : set -g fish_escape_delay_ms 100 fish fish_sequence_key_delay_ms <#envvar- fish_sequence_key_delay_ms>: # j,k vi . # "j" # "k" bind -M insert -m default j,k cancel repaint-mode # "k" # "j" . set -g fish_sequence_key_delay_ms 200 ( / Kill Ring) fish (kill ring) . ctrl-k (kill-line) . (kill ring) . ( "yanking" ) ctrl-y ( yank) . alt-y (yank-pop) . ctrl-x / ctrl-v ( fish_clipboard_copy fish_clipboard_paste [3]) fish "Bracketed Paste Mode" . () . fish_killring . begin-selection end-selection ( vi ) . fish_cursor_selection_mode <#envvar-fish_cursor_selection_mode> (inclusive) (exclusive). exclusive . vi block underscore inclusive . [3] . xsel xclip wl-copy/wl-paste pbcopy/pbpaste . (Multiline editing) fish . : o enter for begin if end <> . o alt-enter enter. o (\) enter . fish . . (Searchable command history) . . . . alt-up (^) alt-down (v) : . ctrl-r . ctrl-r [4] ctrl-s [5] . . . escape pagedown . . . . ~/.local/share/fish/fish_history ( $XDG_DATA_HOME/fish/fish_history ) . fish_history ( _history ) . history <> . : 'make' make . cd m m alt-up (^) 'm' . [4] history-pager . bind <> . [5] pager-toggle-search . (PRIVATE MODE) fish . $fish_private_mode fish --private ( fish -P) . fish -P . ( ) . fish fish_private_mode (if test -n "$fish_private_mode" ...). (NAVIGATING DIRECTORIES) cd <> fish . pwd <> $PWD <#variables-special> . . (Directory history) fish cd <> dirprev dirnext . : o dirh <> o cdh <> o prevd <> . alt-left (<-) o nextd <> . alt-right (->) (Directory stack) bash . : o dirs <> o pushd <> o popd <> (AUTHORS) fish-shell (COPYRIGHT) fish-shell 4.9 September 7, 2026 FISH-INTERACTIVE(1)