Why Switch from iTerm2 + oh‑my‑zsh + tmux to Ghostty? Quick Setup Guide
This article explains why moving from the classic iTerm2 + oh‑my‑zsh + tmux stack to Ghostty improves performance, native split‑screen, and consistency, and provides a step‑by‑step guide to install Ghostty together with essential CLI tools like fzf, ripgrep, lazygit, yazi and lsd for a fast, modern terminal workflow.
Why switch from iTerm2 + oh‑my‑zsh + tmux
The previous stack required three separate layers (terminal emulator, shell, tmux). Frequent use made the setup feel like a patched‑together system: remembering tmux shortcuts, configuring multiple files, and dealing with overlapping key bindings.
What Ghostty provides
Performance : smoother window rendering, scrolling and split‑screen handling.
Native split‑screen : no need for tmux for most local development splits.
Consistent experience : macOS‑style shortcuts work out of the box.
Ghostty replaces only the terminal emulator; the shell layer (zsh + oh‑my‑zsh) is kept for its mature features.
Core toolset (5 essential components)
Ghostty – the terminal emulator.
zsh + oh‑my‑zsh – shell foundation.
fzf – fuzzy finder for commands, files and directories.
ripgrep ( rg) – fast content search.
lazygit, yazi, lsd – Git UI, terminal file manager and modern ls.
Installation
brew install --cask ghostty
brew install fzf ripgrep lazygit yazi lsdMinimal Ghostty configuration
# ~/.config/ghostty/config
font-family = JetBrainsMono Nerd Font
font-size = 14
theme = catppuccin-mocha
background-opacity = 0.95
cursor-style = bar
window-decoration = true
keybind = cmd+d=new_split:right
keybind = cmd+shift+d=new_split:downThis configuration works out‑of‑the‑box; you can later tweak fonts, theme and key bindings.
Shell layer preserved
The following zsh components remain valuable after the switch: zsh – core shell. oh‑my‑zsh – community plugins and theme support. powerlevel10k – fast, informative prompt. zsh‑autosuggestions – history‑based command suggestions. zsh‑syntax‑highlighting – colour‑coded syntax error detection.
.zshrc example
# Oh My Zsh
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="powerlevel10k/powerlevel10k"
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
source $ZSH/oh-my-zsh.sh
# fzf shell integration
source <(fzf --zsh)
# Useful aliases
alias lg="lazygit"
alias ls="lsd"
alias ll="lsd -l"
alias la="lsd -la"
# yazi wrapper that cd's back to the last visited directory
function y() {
local tmp=$(mktemp -t "yazi-cwd.XXXXXX")
yazi "$@" --cwd-file="$tmp"
cwd=$(cat -- "$tmp")
if [[ -n "$cwd" && "$cwd" != "$PWD" ]]; then
builtin cd -- "$cwd"
fi
rm -f -- "$tmp"
}fzf – turning memory into search
After installing, enable the shell integration with source <(fzf --zsh). Typical shortcuts: Ctrl + R – fuzzy search command history. Ctrl + T – fuzzy file selection (inserts the path into the command line). Alt + C – fuzzy directory navigation.
ripgrep ( rg ) – fast content search
rgis a modern replacement for grep that is typically >10× faster, respects .gitignore by default and supports modern regex.
# Find a function name
rg "useEffect"
# Search error messages
rg "connection refused"
# Search only TypeScript files
rg "TODO" --type ts
# Search for a config key
rg "PORT="lazygit – visual Git for the terminal
Install and create a short alias:
brew install lazygit
alias lg="lazygit"Running lg inside a Git repository opens an interactive TUI where you can stage, commit, view diffs and switch branches without remembering many flags.
yazi – terminal file manager with automatic cd
The wrapper function y() (shown in the .zshrc example) launches yazi and, after quitting, changes the shell's working directory to the last visited folder.
lsd – modern ls
Aliases provide colour, icons and tree view:
alias ls="lsd"
alias ll="lsd -l"
alias la="lsd -la"
alias lt="lsd --tree"Verification checklist
Confirm Ghostty opens and split‑screen shortcuts ( cmd+d, cmd+shift+d) work.
Reload .zshrc and test autosuggestions (type git) and syntax highlighting (run a valid and an invalid command).
Check fzf shortcuts ( Ctrl+R, Ctrl+T, Alt+C) bring up the expected fuzzy UI.
Run rg "ghostty" on a file to verify ripgrep works.
Launch lazygit via lg inside a repo.
Run y, navigate, quit, and ensure the shell cd's to the visited directory.
Execute ls, ll, la and confirm lsd output.
Typical workflows
Project start : open Ghostty, split panes for server, commands and logs, jump to the project directory with Alt+C or y.
Debugging : use rg to locate error strings, Ctrl+R to reuse recent commands, and lg to inspect recent Git changes.
File management : browse with y, then continue work in the same shell; view directory trees with lt.
Why keep the shell layer after moving to Ghostty
Ghostty solves the "terminal emulator" layer but does not replace shell interaction. Retaining zsh, oh‑my‑zsh and the following plugins preserves high‑value features:
Command autosuggestions – reduces typing and encourages reuse of previous commands.
Syntax highlighting – instantly shows whether a command exists or arguments are malformed.
Powerlevel10k prompt – clear Git status and path information.
Step‑by‑step migration guide
1. Replace the terminal emulator
brew install --cask ghosttyAfter installation, open Ghostty and verify that a new window appears and that the split‑screen shortcuts work.
2. Install the efficiency tools
brew install fzf ripgrep lazygit yazi lsdEnable fzf integration ( source <(fzf --zsh)) and add the aliases shown above.
3. Add zsh plugins (if not already present)
# Clone plugins
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlightingThen enable them in .zshrc as shown in the example.
4. Verify each component
Ghostty opens and respects the keybindings.
fzf shortcuts bring up the fuzzy UI. rg returns matches for a test pattern. lg launches lazygit. y opens yazi and returns to the selected directory.
lsd aliases produce coloured output.
Practical usage examples
Searching command history with fzf
Ctrl+R # type part of a previous command, select with arrows, press EnterFinding a file with fzf
Ctrl+T # fuzzy file selector, press Enter to insert the pathChanging directory quickly
Alt+C # fuzzy directory selector, press Enter to cdSearching code with ripgrep
rg "useEffect" # find all occurrences of a function name
rg "TODO" --type ts # search only TypeScript files
rg "PORT=" # locate configuration keysGit workflow with lazygit
lg # open TUI, use space to stage, c to commit, b to switch branches, d to view diff, ? for helpFile navigation with yazi
y # open yazi, navigate, quit with q, shell automatically cd's to the last directoryDirectory listing with lsd
ls # colourised listing
ll # long format
la # include hidden files
lt # tree viewSummary of benefits
Speed : Ghostty renders faster, ripgrep searches >10× quicker than grep.
Simplicity : native split‑screen removes the need for tmux in most local development scenarios.
Consistency : macOS‑style shortcuts work uniformly across the stack.
High‑frequency tooling : fzf, rg, lazygit, yazi and lsd dramatically shorten common actions.
The migration path is low‑cost: replace only the terminal emulator, keep the mature zsh ecosystem, and gradually adopt the high‑impact CLI tools. This results in a faster, more reliable and less mentally fragmented workflow.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
