Skip to content
shell (fish)

Shell shortcuts (fish)

Interactive-shell bindings: custom bind lines from this repo, plus the bindings injected by atuin and fish itself.

Custom bindings

Generated from the bind lines in fish/ by tools/gen-docs.py — run just docs-update to refresh.

KeysActionDefined in
Alt+yOpen the yazi file managerfish/aliases.d/files.fish
Ctrl+tInsert file path(s) (fzf)fish/aliases.d/fzf-pickers.fish
Ctrl+Alt+dInsert a directory path (fzf)fish/aliases.d/fzf-pickers.fish
Ctrl+Alt+gInsert pacman package(s) (fzf)fish/aliases.d/fzf-pickers.fish
Ctrl+Alt+lInsert a commit SHA (fzf)fish/aliases.d/fzf-pickers.fish
Ctrl+Alt+sInsert changed file path(s) (fzf)fish/aliases.d/fzf-pickers.fish
Ctrl+Alt+pInsert a PID (fzf)fish/aliases.d/fzf-pickers.fish
Ctrl+vInsert a shell variable name (fzf)fish/aliases.d/fzf-pickers.fish
Ctrl+hDelete the word left of the cursorfish/aliases.d/keybinds.fish
Ctrl+eNeovim config picker (default / nvim-lazy / nvim-full)fish/conf.d/nvim-switcher.fish

thefuck — fix the last command

Bound inside fish_user_key_bindings (fish/conf.d/thefuck.fish), so they only appear in interactive shells.

KeysAction
Esc Esc or Ctrl+fCorrect the previous command (thefuck)
fuck (typed)Same, as a function

History — atuin

atuin init fish --disable-up-arrow (in config.fish), so the up arrow keeps plain fish history.

KeysAction
Ctrl+rFuzzy-search shell history (atuin)
?Ask atuin AI (on an empty prompt)

fish built-ins worth remembering

KeysAction
Alt+e Alt+vEdit the command line in $EDITOR
Alt+sPrepend sudo (or doas) to the current (or last) command
Alt+bPrevious directory (prevd) on an empty line, else back one word
Alt+↑ Alt+↓Search history for the token under the cursor
Alt+lList the directory of the token under the cursor
Alt+pAppend `&
Alt+h F1Man page for the command under the cursor
Alt+wOne-line description of the command under the cursor
Ctrl+wDelete one path component to the left
Ctrl+zUndo last edit

Inside herdr: Alt+h/j/k/l are intercepted by vim-herdr-navigation for pane/split movement, so fish’s Alt+h (man page) and Alt+l (list dir) only fire in a bare terminal — use F1 for the man page inside herdr. (Alt+y is rebound to the yazi launcher — see Custom bindings above — which shadows fish’s yank-pop.)

Handy abbreviations & functions

The abbreviation-tips plugin reminds you of these when you type the long form.

TypeExpands to / does
mux / mux1open or re-attach tmux session mux0 / mux1
nvimsfzf picker for neovim configs (default / nvim-lazy / nvim-full)
nv / lvineovim with the light / lazy config
z / zizoxide: jump to dir / interactive picker
bback to the previous directory and list it
mcdmkdir -p + cd into it
cpvcopy with progress bar (rsync)