Shell Completions Reference
OtherQuick-reference table of keyboard shortcuts and autocomplete triggers for bash, zsh, and fish shells.
Tab Completion Basics
| Feature | bash | zsh | fish |
|---|---|---|---|
| File / directory completion | Tab | Tab | Tab |
| Command completion | Tab | Tab | Tab |
| Cycle through matches | Tab (twice) | Tab repeatedly | Tab repeatedly |
| List all matches | Tab (twice) | Tab (once) | Tab (once) |
| Variable completion ($VAR) | Tab | Tab | Tab |
| Username completion (~user) | Tab | Tab | Tab |
| Hostname completion (@host) | Tab | Tab | Tab |
| Command options (--flag) | Tab (after -) | Tab | Tab |
History Search & Navigation
| Action | bash | zsh | fish |
|---|---|---|---|
| Reverse history search | Ctrl+R | Ctrl+R | Ctrl+R |
| Forward history search | Ctrl+S | Ctrl+S | Ctrl+S |
| Previous command | ↑ / Ctrl+P | ↑ / Ctrl+P | ↑ / Ctrl+P |
| Next command | ↓ / Ctrl+N | ↓ / Ctrl+N | ↓ / Ctrl+N |
| Beginning of line | Ctrl+A | Ctrl+A | Ctrl+A |
| End of line | Ctrl+E | Ctrl+E | Ctrl+E |
Kill / Yank (Cut / Paste)
| Action | bash | zsh | fish |
|---|---|---|---|
| Cut from cursor to end | Ctrl+K | Ctrl+K | Ctrl+K |
| Cut from cursor to start | Ctrl+U | Ctrl+U | Ctrl+U |
| Cut word backwards | Ctrl+W | Ctrl+W | Ctrl+W |
| Cut word forwards | Alt+D | Alt+D | Alt+D |
| Paste last cut text | Ctrl+Y | Ctrl+Y | Ctrl+Y |
| Transpose characters | Ctrl+T | Ctrl+T | Ctrl+T |
Directory Navigation
| Action | bash | zsh | fish |
|---|---|---|---|
| Go to home directory | cd (alone) / cd ~ | cd (alone) / cd ~ | cd (alone) / cd ~ |
| Go to previous directory | cd - | cd - | cd - |
| Directory stack | pushd / popd / dirs | pushd / popd / dirs | pushd / popd / dirs |
| Autocd (type dir name) | shopt -s autocd | setopt autocd | Built-in |
| Fuzzy dir matching | — | Tab (with completion) | Tab |
Process Management
| Action | bash | zsh | fish |
|---|---|---|---|
| Interrupt (SIGINT) | Ctrl+C | Ctrl+C | Ctrl+C |
| Suspend (SIGTSTP) | Ctrl+Z | Ctrl+Z | Ctrl+Z |
| End of file (EOF) | Ctrl+D | Ctrl+D | Ctrl+D |
| Clear screen | Ctrl+L | Ctrl+L | Ctrl+L |
| Jobs list | jobs | jobs | jobs |
| Foreground job | fg | fg | fg |
| Background job | bg | bg | bg |
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.