Terminal Setup for macOS: ZSH + Oh My Zsh
Posted on December 21, 2025
I spent way too much time tweaking my terminal setup over the years. This is what I ended up with: syntax highlighting that catches typos before I hit enter, autosuggestions that complete commands from my history as I type, and fuzzy search to dig up that docker command I ran three months ago. The whole setup takes about 10 minutes.

Quick Start
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"- Install fzf for fuzzy finding
brew install fzf- Install Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"- Install zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions- Install zsh-autocomplete
git clone --depth 1 -- https://github.com/marlonrichert/zsh-autocomplete.git $ZSH_CUSTOM/plugins/zsh-autocomplete- Install fast-syntax-highlighting
git clone https://github.com/zdharma-continuum/fast-syntax-highlighting.git \
${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fast-syntax-highlighting- Add plugins to
~/.zshrc(see Configuration) and reload:
source ~/.zshrcKey Components
Terminal Application
Terminal.app works, but lacks split panes and GPU acceleration. I use iTerm2, but there are other options depending on what you need:
- iTerm2: Split panes, search, extensive customization. What most Mac developers use.
- Ghostty: Released late 2024, GPU-accelerated, very fast startup. New terminal, still lacks some features like ligatures.
- Kitty: GPU-accelerated, highly configurable via
kitty.conf. Steeper learning curve. - Alacritty: Minimal and fast. No tabs or splits - pair with tmux.
Shell Framework: Oh My Zsh
Oh My Zsh handles plugin loading and provides ~300 plugins out of the box. Instead of writing shell scripts, you add plugin names to an array in ~/.zshrc.
If startup feels slow, zinit or antidote offer lazy loading for faster shell init.
Autocompletion Plugins
These two plugins do different things, and I use both:
- zsh-autosuggestions: Shows gray text at your cursor with a suggestion from your history. Press right arrow to accept.
- zsh-autocomplete: Shows a dropdown menu below your prompt with possible completions. Navigate with arrows, press Tab to select.
You can use one or both depending on preference. I like having both since they complement each other.
- fast-syntax-highlighting: Highlights commands as you type. Valid commands turn green, typos turn red.
History Search
Use Ctrl+R to trigger history search. With fzf installed and enabled through Oh My Zsh, you get a fuzzy finder for your command history that's much more powerful than the default search.

Themes
Themes control how your prompt looks but don't affect behavior. Oh My Zsh includes many built-in themes configured via the ZSH_THEME variable in ~/.zshrc:
ZSH_THEME="robbyrussell" # minimal, fast
# ZSH_THEME="agnoster" # shows git branch, needs Nerd FontsSome themes (like agnoster, powerlevel10k) require special fonts to display icons and symbols correctly. Install Nerd Fonts to get these working:
brew install --cask font-meslo-lg-nerd-fontThen set the font in your terminal app settings. If you see broken characters or squares in your prompt, you likely need to install and configure a Nerd Font.
For a cross-shell alternative, check out Starship, a fast, customizable prompt that works across different shells.

Configuration
Here's a recommended Oh My Zsh plugins configuration for ~/.zshrc:
plugins=(
git # aliases: gst, gco, gp, gcmsg, etc.
macos # ofd (open Finder), pfd (print Finder dir)
zsh-autosuggestions # gray text suggestions from history
zsh-autocomplete # dropdown completion menu
fzf # fuzzy finder integration
sudo # press Esc twice to add sudo
colored-man-pages # syntax highlighting in man pages
history-substring-search # must be after zsh-autosuggestions
fast-syntax-highlighting # must be last
# Optional:
# aws docker npm
)Performance tip: Each plugin adds to your shell startup time. Only include plugins you actually use. If shell init feels slow, try removing some plugins.
Extending PATH
To add directories to your PATH:
export PATH=$PATH:/path/to/your/binAliases and Functions
Shortcuts for frequently used commands. Add to your ~/.zshrc:
# Create directory and cd into it
mkcd() {
mkdir -p "$1" && cd "$1"
}
# Quick navigation
alias ..="cd .."
alias ...="cd ../.."
# List files with details
alias ll="ls -la"
# Confirm before overwriting
alias cp="cp -i"
alias mv="mv -i"
alias rm="rm -i"
# Git shortcuts
alias gst="git status"
alias gp="git pull"
alias gc="git commit"Optional: Terminal Multiplexers
Use tmux or Zellij if you want session management and window splitting:
- tmux: The classic choice. Powerful and widely used.
- Zellij: Modern alternative to tmux with a more user-friendly interface.
Both let you split screens, manage workspaces, and keep sessions running after disconnection (useful for SSH - reconnect and your session is still there).
Troubleshooting
Slow shell startup
Too many plugins or a heavy theme can slow things down. Measure shell init time with:
time zsh -i -c exitAnything under 0.5s is fine. If it's slower, remove unused plugins or switch to a lighter theme like robbyrussell.
Plugins not loading
Check that the plugin exists in ~/.oh-my-zsh/custom/plugins/ and is spelled correctly in the plugins array.
Autosuggestions not showing
Verify zsh-autosuggestions is in your plugins array. Some terminal color schemes make suggestions invisible. Try a different terminal or theme.
Broken prompt or weird characters
Your theme likely requires Nerd Fonts. See Themes section for installation. Or switch to a simpler theme like robbyrussell.
Command not found after PATH change
Changes to ~/.zshrc require reloading. Run source ~/.zshrc or restart your terminal.
Quick Reference: Keyboard Shortcuts
These work in ZSH and most other shells:
| Shortcut | Action |
|---|---|
Ctrl+A | Move to beginning of line |
Ctrl+E | Move to end of line |
Ctrl+U | Clear entire line |
Ctrl+W | Delete word before cursor |
Ctrl+R | Search command history |
Ctrl+L | Clear screen (keeps scrollback) |
Cmd+K | Clear screen and scrollback (iTerm2) |
Tab | Autocomplete |
