Fish Shell & Modern CLI Reference Guide
The Fish Shell (Friendly Interactive Shell) paired with modern CLI utilities (written in Rust and Go) transforms the terminal from an arcane prompt into a responsive, color-coded, and highly interactive productivity engine.
This reference guide covers the modern command-line tools, shell keybindings, fuzzy search shortcuts, navigation helpers, and custom automation functions configured in this setup.
1. Modern CLI Tools Cheat Sheet
Section titled “1. Modern CLI Tools Cheat Sheet”Traditional Unix tools (ls, cat, grep, find, top, ps, df, du, rm) have modern replacements with syntax highlighting, Git integration, safe deletion, and intuitive visual formatting.
| Tool | Replaces | Primary Aliases | What It Does & When to Use It |
|---|---|---|---|
| eza | ls, tree |
ls, ll, la, lt, tree |
File listing with icons, color-coded permissions, Git status badges, and tree hierarchies. |
| bat | cat, less |
cat, catp, view, page |
Smart file viewer with automatic syntax highlighting, line numbers, and mouse-scrollable pagination. |
| yazi | — | files, fm |
Blazingly fast visual terminal file explorer with arrow navigation and instant file previews. |
| trash | rm |
trash |
Safely moves files to macOS Trash (recoverable from GUI Trash) instead of permanent deletion. |
| nano | vi, nvim |
edit, e |
Friendly, intuitive terminal text editor with an on-screen keyboard shortcut bar. |
| ripgrep | grep |
rg, rgi |
Ultra-fast recursive code search. Respects .gitignore by default. |
| fd | find |
fd |
Intuitive, colorized file search with regex and fuzzy pattern matching. |
| duf | df |
df |
Clean, visual disk space and filesystem usage table. |
| dust | du |
du |
Instant graphical tree showing which folders consume the most disk space. |
| btop | top, htop |
top |
Interactive visual dashboard monitoring CPU, memory, disks, network, and processes. |
| procs | ps |
ps |
Human-readable process viewer with colored PID, memory, user, and TCP port columns. |
| delta | diff |
diff |
Side-by-side syntax-highlighted git diffs with intra-line word-level change highlights. |
| zoxide | cd |
z, zi |
Smarter cd that learns your most frequent directories for instant fuzzy jumping. |
| fzf | — | Ctrl+P, Ctrl+R, Ctrl+F |
General-purpose interactive fuzzy finder for files, history, git commits, and processes. |
2. Directory Navigation & Smart Jumping
Section titled “2. Directory Navigation & Smart Jumping”Smart CD with Zoxide
Section titled “Smart CD with Zoxide”Instead of typing lengthy relative paths (cd ../../../Documents/Git/project), zoxide tracks your history and lets you jump directly by typing partial folder names:
# Jump to the highest-scoring directory matching "studio"z studio
# Open an interactive fzf picker of recent matching directorieszi audio
# Quick jump to home~h
# Go back to the previous directory (cd -)cddQuick Traverse Shortcuts
Section titled “Quick Traverse Shortcuts”.. # cd .. (up 1 level)... # cd ../.. (up 2 levels).... # cd ../../.. (up 3 levels)Make & Enter Directory (mkcd)
Section titled “Make & Enter Directory (mkcd)”Creates the entire directory path (including nested parent folders) and immediately enters it:
mkcd my-new-project/src/components3. Interactive FZF Keybindings & Search
Section titled “3. Interactive FZF Keybindings & Search”FZF is preconfigured with Catppuccin Mocha theme styling, rounded borders, and real-time bat preview windows.
| Keybinding | Action | Description |
|---|---|---|
| Ctrl + P / Ctrl + R | Fuzzy History | Search through full command history; press Enter to run or Tab to edit. |
| Ctrl + F | Fuzzy File Search | Interactive file/folder picker with live bat syntax preview. |
| Ctrl + G | Git Log Search | Interactive Git commit history browser with commit diff previews. |
| Ctrl + S | Git Status Search | Fuzzy-pick modified files from git status with staged/unstaged diffs. |
| Ctrl + X | Fuzzy Process Killer | Select running processes and terminate them interactively (fkill). |
| Ctrl + Z | Interactive Zoxide | Trigger zi directory jumper modal. |
| Right Arrow → | Accept Autosuggestion | Complete Fish’s subtle inline autocomplete suggestion. |
| Ctrl + E | Edit in Nano | Open current command buffer in Nano ($EDITOR) with on-screen shortcuts. |
| Ctrl + L | Clear Screen | Clears screen while preserving terminal scrollback history. |
| Ctrl + / | Toggle Preview | Toggle FZF preview pane on or off. |
| Ctrl + Y | Copy to Clipboard | Copy selected FZF line to macOS clipboard (pbcopy). |
4. Git Productivity Shortcuts
Section titled “4. Git Productivity Shortcuts”Common multi-word Git commands are aliased into fast two- and three-letter shortcuts:
# Status & Staginggs # git status -sb (compact, branch-aware status)ga <file> # git add <file>ga . # git add all
# Committinggc # git commit -v (opens Nano with full diff context)gcm "msg" # git commit -m "msg"
# Branching & Switchinggb # git branch (list local)gba # git branch -a (list local + remote)gco <br> # git checkout <branch>gcb <br> # git checkout -b <new-branch>gcof # Fuzzy checkout: interactive fzf branch picker
# Syncing & Historygp # git pushgpl # git pullgl # git log --oneline -20 (compact last 20 commits)gla # git log --oneline --all -30 (all branches graph)gd # git diff (unstaged changes via delta)gds # git diff --staged (staged changes via delta)gr # git remote -vgf # git fetchgm <br> # git merge <branch>grb <br> # git rebase <branch>
# Stashinggst # git stashgstp # git stash pop
# GitHub PR Automationghpr # Opens GitHub PR comparison in your browser for current branch5. System, Network & Helper Functions
Section titled “5. System, Network & Helper Functions”Everyday & Beginner-Friendly Shortcuts
Section titled “Everyday & Beginner-Friendly Shortcuts”tips # Visual, color-coded cheatsheet of all essential shortcutsfiles / fm # Open Yazi visual terminal file manager (arrow keys to browse & preview)view <file> # Open document in paginated reader (trackpad scrollable, 'q' to quit)edit <file> # Open file in friendly Nano editor with shortcut guideo # Instantly open current directory in macOS Finder (open .)trash <file> # Move file safely to macOS Trash (recoverable from GUI Trash)copy / paste # Copy to / paste from macOS system clipboard (pbcopy / pbpaste)ip # Clean dual display of local network IP and public IPpaths # Prints system $PATH line-by-line for clean, readable inspectionreload # Reload Fish configuration instantly (exec fish)ports # List all active listening TCP/UDP ports (lsof -i -P -n)weather # Quick 1-line weather forecast summaryh # View shell historyhgrep <term> # Search command history using ripgrep (e.g. hgrep docker)c # Clear terminal screenUniversal Archive Extractor (extract)
Section titled “Universal Archive Extractor (extract)”Extracts any supported compressed archive format without remembering flags:
extract backup.tar.gzextract dataset.zipextract archive.7zextract package.tar.bz2Tmux Session Management
Section titled “Tmux Session Management”tm <name> # Create a new tmux session or attach if it already existstms # Interactive fzf switcher between active tmux sessionsFuzzy Process Killer (fkill)
Section titled “Fuzzy Process Killer (fkill)”fkill # Interactive fzf list to kill a rogue process (sends SIGKILL)fkill 15 # Send graceful SIGTERM (15) instead of SIGKILL (9)6. OpenCode AI Agent Shortcuts
Section titled “6. OpenCode AI Agent Shortcuts”Direct CLI triggers for specialized OpenCode task agents:
ocf <query> # opencode --agent financeoch <query> # opencode --agent healthochome <query> # opencode --agent homeocl <query> # opencode --agent learningoclog <query> # opencode --agent logisticsochob <query> # opencode --agent hobbiesoco <query> # opencode --agent cookingoclib <query> # opencode --agent librarianoccrit <query> # opencode --agent brutal-criticocdist <query> # opencode --agent distillerocsetup <query> # opencode --agent project-setup
# Scaffold new project workspace in Obsidian vaultocl-new "Market Analysis"# Creates: ~/Documents/Obsidian/beep-notes/5. Opencode/Inbox/YYYY-MM-DD_Market-Analysis7. Configuration & Plugins Architecture
Section titled “7. Configuration & Plugins Architecture”- Primary Config File:
~/.config/fish/config.fish - Plugin Manager (Fisher):
Terminal window fisher install jorgebucaran/fisher # Package managerfisher install patrickf1/fzf.fish # Interactive FZF integrationfisher install jethrokuan/z # Zoxide / directory trackingfisher list # List installed pluginsfisher update # Update all plugins - Prompt: Starship configured with Catppuccin Mocha floating capsules (
/), folder badges, and dynamic execution timers (~/.config/starship.toml). - Terminal Emulator: cmux (libghostty engine) styled via
~/.config/ghostty/configwith Catppuccin Mocha, 90% background opacity, native macOS background blur, and 16px padding. - Keybindings: Standard macOS / Emacs bindings (
fish_default_key_bindings). Familiar arrow key navigation and typing without Vi modal locks or accidental Escape traps. - Default Editor: Configured to
nano($EDITORand$VISUAL) with on-screen shortcuts for quick, hassle-free file edits. - Environment & Toolchains:
cmuxCLI shims (/Applications/cmux.app/Contents/Resources/bin) for livecmux markdownpreviews andcmux diffside panels.uv(fast Python toolchain) sourced via~/.local/bin/env.fish.OrbStackDocker engine integration.LM Studio CLI&Antigravitybin paths pre-configured in$PATH.