# My ZSH Setup - Oh My Zsh, Plugins & Configuration

Table of Contents

As developers, we spend a significant portion of our time in the terminal. A well-configured shell can dramatically increase productivity and make daily work more enjoyable. In this post, I’ll walk you through my personal ZSH setup with Oh My Zsh, the plugins I use, and how everything is configured.

💡 Why ZSH? ZSH offers extended features over Bash like better tab completion, spell correction, themes, and a huge plugin ecosystem.

Installation and Basic SetupLink to heading

Installing ZSHLink to heading

Terminal window
# macOS (usually pre-installed)
brew install zsh
# Ubuntu/Debian
sudo apt install zsh
# Set as default shell
chsh -s $(which zsh)

Installing Oh My ZshLink to heading

Oh My Zsh is a framework that simplifies ZSH configuration and provides hundreds of plugins and themes.

Terminal window
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Theme ConfigurationLink to heading

A good theme doesn’t just make the terminal prettier, but also more informative. Oh My Zsh offers hundreds of themes to choose from. Here are my recommendations:

Avit Theme (my choice)Link to heading

The Avit theme is minimalistic and shows all important information:

Terminal window
# In ~/.zshrc
ZSH_THEME="avit"
Avit Theme Screenshot

The Avit theme in action - clean, informative, and developer-friendly

Alternative: AgnosterLink to heading

For more information and Git status:

Terminal window
ZSH_THEME="agnoster"

Check out the official theme gallery for screenshots and descriptions of all available themes. Other highly recommended alternatives:

  • robbyrussell - The default theme, minimalistic
  • powerlevel10k - Very powerful and configurable (separate plugin)
  • spaceship - Modern with lots of information
  • pure - Minimalistic and fast

The Avit theme displays:

  • Current path
  • 🌿 Git branch and status
  • Exit code of last command
  • 🕐 Timestamp

Essential PluginsLink to heading

Plugins are the heart of a productive ZSH configuration. For a comprehensive list of all available plugins, check out the Awesome ZSH Plugins collection. Here are the most important ones:

Terminal window
# In ~/.zshrc
plugins=(
zsh-syntax-highlighting # Syntax highlighting for commands
zsh-autosuggestions # Intelligent command suggestions
git # Git aliases and functions
colored-man-pages # Colored man pages
colorize # Syntax highlighting for files
github # GitHub CLI integration
python # Python-specific aliases
brew # Homebrew integration (macOS)
macos # macOS-specific utilities
docker # Docker commands and completion
docker-compose # Docker Compose support
zsh-completions # Extended tab completion
)

Environment & Path ConfigurationLink to heading

Clean PATH configuration is essential for a functioning development environment:

Terminal window
# Base PATH
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
# Homebrew (macOS)
export PATH="/opt/homebrew/bin:$PATH"
# Ruby via RVM
export PATH="$PATH:$HOME/.rvm/bin"
# Node.js via NVM
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
# Bun
export BUNVM_DIR="$HOME/.bunvm"
export PATH="$HOME/.bunvm/versions/bun-1.3.9/bin:$PATH"
[ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun"
# zsh-z - intelligent directory navigation
source ~/.zsh-plugins/zsh-z.plugin.zsh

Useful KeybindingsLink to heading

ZSH offers powerful keybindings for more efficient navigation:

Terminal window
# Jump forward by word with Ctrl+F
bindkey '^f' vi-forward-blank-word
# Other useful bindings
bindkey '^R' history-incremental-search-backward # Reverse search
bindkey '^[[A' history-search-backward # Arrow up
bindkey '^[[B' history-search-forward # Arrow down

Performance OptimizationLink to heading

With many plugins, ZSH can become slow. Here are optimization tips:

Limit Plugin CountLink to heading

Terminal window
# Only load plugins you actually use
plugins=(git zsh-syntax-highlighting zsh-autosuggestions)

Lazy Loading for Heavy ToolsLink to heading

Terminal window
# Load NVM only when needed
nvm() {
unset -f nvm
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm "$@"
}

Measure Startup TimeLink to heading

Terminal window
# Time the startup
time zsh -i -c exit

More Interesting PluginsLink to heading

The Awesome ZSH Plugins list contains hundreds of additional plugins for special use cases:

  • thefuck - Automatically corrects erroneous commands
  • zsh-z - Intelligent directory navigation
  • fast-syntax-highlighting - Even faster syntax highlighting
  • zsh-history-substring-search - Better history search
  • zsh-abbr - Abbreviations like in Fish Shell

Essential AliasesLink to heading

While plugins extend functionality, aliases save keystrokes daily. Here are some must-have aliases that complement your plugin setup:

Git AliasesLink to heading

Terminal window
# Git shortcuts in ~/.zshrc
alias g="git"
alias gp="git push"
alias gf="git fetch"
alias gpu="git pull"
alias gch="git checkout"
alias gfork="open -a fork ." # Open Fork app (macOS)

Modern CLI Tool AliasesLink to heading

Terminal window
# Better versions of standard commands
alias ols='ls' # Backup original ls
alias ls='eza -la' # Modern ls replacement
alias ll='eza -lbhHigUmuSa --time-style=long-iso --git --color-scale'
alias lls='ll --sort=size' # Sort by size
alias cat='bat' # cat with syntax highlighting

Docker & DevelopmentLink to heading

Terminal window
# Docker shortcuts
alias dp="ctop" # Container monitoring
alias dps="lazydocker" # Docker TUI
# Quick access
alias o="open" # Open file/folder (macOS)
alias s="subl" # Sublime Text

PythonLink to heading

Terminal window
# Python
alias python=/usr/local/bin/python3.6
alias pip=/usr/bin/pip3

Backup and SynchronizationLink to heading

Back up your ZSH configuration:

Terminal window
# Put .zshrc in Git repository
cd ~
git init
git add .zshrc
git commit -m "Initial zsh config"
# Or use dotfiles managers like stow or chezmoi

ConclusionLink to heading

A well-configured ZSH makes daily development work more efficient and enjoyable. The configurations shown form a solid foundation that you can extend according to your needs. This should give you an idea what is possible with ZSH and Oh My Zsh, and how to set up a powerful terminal environment. It’s very individual thing, so feel free to experiment with themes, plugins, and aliases to find what works best for you. Happy coding!

My avatar

Thanks for reading my blog post! Feel free to check out my other posts or contact me via the social links in the footer.


More Posts