Overview
This Zsh configuration provides a modern, fast, and feature-rich shell experience using Zinit as the plugin manager and Powerlevel10k as the theme. The setup includes intelligent autocompletion, syntax highlighting, and various productivity tools.Features
- Zinit Plugin Manager: Fast, flexible plugin management with turbo mode
- Powerlevel10k Theme: Beautiful, fast prompt with Git integration
- Auto Suggestions: Command suggestions based on history
- Syntax Highlighting: Real-time command syntax validation
- Smart Navigation: Directory jumping with zoxide
- Git Integration: Interactive Git operations with forgit and git shortcuts
Installation
Configuration Structure
The configuration is split into multiple files for better organization:Core Plugins
Zinit Plugin Manager
Zinit is automatically installed on first run:Powerlevel10k Theme
Fast, customizable prompt with Git integration:Run
p10k configure to customize the prompt appearance, or edit ~/.config/zsh/p10k.zsh directly.Zsh-Autosuggestions
Suggests commands as you type based on history:→ (right arrow) to accept suggestions.
Syntax Highlighting
Highlights commands in real-time:- Green: Valid command
- Red: Invalid command
- Blue: Built-in command
History Substring Search
Search command history using substring matching:↑/↓ to cycle through matches.
Auto-pair
Automatically closes brackets, quotes, and parentheses:Completion Plugins
Zsh-Completions
Additional completion definitions:Fzf-Tab
Fuzzy finder for tab completion:Yarn Completion
Development Tools
Zoxide
Smart directory navigation that learns your habits:Forgit
Interactive Git commands using fzf:ga- Interactivegit addglo- Interactivegit loggd- Interactivegit diffgrh- Interactivegit reset HEADgcf- Interactivegit checkout <file>
Direnv
Automatically loads/unloads environment variables:.envrc files in project directories:
Docker Compose
Latest Docker Compose binary:System Tools
Duf
Better disk usage utility:duf - Shows disk usage with color and formatting.
Gdu
Fast disk usage analyzer:gdu <directory> - Interactive disk usage explorer.
Oh My Zsh Snippets
Load specific Oh My Zsh plugins without the framework:Git Plugin Aliases
Common Git Aliases
Common Git Aliases
| Alias | Command |
|---|---|
g | git |
ga | git add |
gaa | git add --all |
gcmsg | git commit -m |
gco | git checkout |
gd | git diff |
gf | git fetch |
gl | git pull |
gp | git push |
gst | git status |
Sudo Plugin
PressESC twice to prefix the current command with sudo.
Extract Plugin
Unified extraction command:Customization
Adding Custom Aliases
Edit~/.config/zsh/aliases.zsh:
Adding More Plugins
Add to~/.config/zsh/plugins.zsh:
Zinit Turbo Mode
The configuration uses turbo mode for faster startup:wait"0a"- Load 0 seconds after promptlucid- Don’t show loading messagesatload- Execute code after loading
Performance Tips
Profile Startup
Clear Cache
Update Plugins
Compile Config
Key Bindings
| Key | Action |
|---|---|
→ | Accept autosuggestion |
↑ | History substring search (up) |
↓ | History substring search (down) |
Ctrl+R | Fuzzy history search |
ESC ESC | Add sudo to command |
Tab | Trigger fzf-tab completion |
Troubleshooting
Slow startup time
Slow startup time
Use turbo mode (
wait) for non-essential plugins. Profile startup:Completions not working
Completions not working
Rebuild completion cache:
Plugin not loading
Plugin not loading
Check Zinit status:
Powerlevel10k not showing
Powerlevel10k not showing