← Dev Tools

Tab Completion Basics

Featurebashzshfish
File / directory completionTabTabTab
Command completionTabTabTab
Cycle through matchesTab (twice)Tab repeatedlyTab repeatedly
List all matchesTab (twice)Tab (once)Tab (once)
Variable completion ($VAR)TabTabTab
Username completion (~user)TabTabTab
Hostname completion (@host)TabTabTab
Command options (--flag)Tab (after -)TabTab

History Search & Navigation

Actionbashzshfish
Reverse history searchCtrl+RCtrl+RCtrl+R
Forward history searchCtrl+SCtrl+SCtrl+S
Previous command↑ / Ctrl+P↑ / Ctrl+P↑ / Ctrl+P
Next command↓ / Ctrl+N↓ / Ctrl+N↓ / Ctrl+N
Beginning of lineCtrl+ACtrl+ACtrl+A
End of lineCtrl+ECtrl+ECtrl+E

Kill / Yank (Cut / Paste)

Actionbashzshfish
Cut from cursor to endCtrl+KCtrl+KCtrl+K
Cut from cursor to startCtrl+UCtrl+UCtrl+U
Cut word backwardsCtrl+WCtrl+WCtrl+W
Cut word forwardsAlt+DAlt+DAlt+D
Paste last cut textCtrl+YCtrl+YCtrl+Y
Transpose charactersCtrl+TCtrl+TCtrl+T

Directory Navigation

Actionbashzshfish
Go to home directorycd (alone) / cd ~cd (alone) / cd ~cd (alone) / cd ~
Go to previous directorycd -cd -cd -
Directory stackpushd / popd / dirspushd / popd / dirspushd / popd / dirs
Autocd (type dir name)shopt -s autocdsetopt autocdBuilt-in
Fuzzy dir matchingTab (with completion)Tab

Process Management

Actionbashzshfish
Interrupt (SIGINT)Ctrl+CCtrl+CCtrl+C
Suspend (SIGTSTP)Ctrl+ZCtrl+ZCtrl+Z
End of file (EOF)Ctrl+DCtrl+DCtrl+D
Clear screenCtrl+LCtrl+LCtrl+L
Jobs listjobsjobsjobs
Foreground jobfgfgfg
Background jobbgbgbg

How to Use

1

Browse the tables

Scroll through the reference tables for bash, zsh, and fish shell shortcuts.

2

Find your shell

Locate the column for your preferred shell (bash, zsh, or fish).

3

Learn and apply

Use the shortcuts in your terminal to improve productivity.

About Shell Completions

Shell completion is the difference between typing fast and typing wrong, and understanding the syntax across bash, zsh, and fish saves hours. ILikePdf Shell Completions documents common command completions for each shell with copy-ready snippets for your dotfiles. Use it as a reference when porting completions or setting up a new machine. The reference is available offline and entirely in your browser.

How to browse shell completions Shell Completions

Step 1: Pick your shell — bash, zsh, or fish.
Step 2: Browse common command completions.
Step 3: Review the completion scripts and options.
Step 4: Copy the snippets for your dotfiles.

Common use cases for Shell Completions

  • Learn completion syntax for your shell.
  • Port completions between bash and zsh.
  • Reference completion options while scripting.
  • Set up completions in dotfiles.

Pro tips

  • Completion behaviour differs slightly across shells.
  • Snippets are ready to drop into your config.
  • Reference material is available offline.

Was this tool helpful? Rate it

Tap a star to rate.