Developer Tools Terminal

Oh My Zsh
Configuration Guide

Complete reference for your optimized terminal workflow with Claude Code, ClaudeKit, and WordPress development

⚡ Quick Start

🔧

1. Install Plugins

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
📝

2. Edit Config

nano ~/.zshrc # hoặc code ~/.zshrc
♻️

3. Reload

source ~/.zshrc # hoặc zshreload

🔌 Essential Plugins

git

Built-in

Git aliases và auto-completion

gst git status
gaa git add --all
gcmsg git commit -m

docker

Built-in

Docker auto-completion

plugins=(... docker docker-compose ...)

z

Navigation

Jump to frequently used directories

z wordpress # Jump to dir containing "wordpress"
z sites # Jump to "sites" directory

zsh-autosuggestions

Must Install

Gợi ý lệnh từ history

Press to accept suggestion

zsh-syntax-highlighting

Must Install

Highlight syntax khi gõ lệnh

✓ Valid command ✗ Invalid command

extract

Utility

Giải nén mọi format

x filename.zip # Extract any archive
x file.tar.gz # Works with all formats

web-search

Utility

Search từ terminal

google "oh my zsh tips"
bing "terminal commands"

macos

System

macOS specific utilities

pfd Print Finder directory
cdf CD to Finder directory

⚡ Custom Aliases

Claude Code & ClaudeKit

cc
claude-code
ccd
claude-code . (current dir)
ck
claudekit
cchelp
claude-code --help

WordPress Development

wp-sites
cd ~/Sites
wp-logs
tail -f nginx error log
wp-clear
wp cache flush
wp-debug
tail -f debug.log

Docker Shortcuts

dcu
docker-compose up -d
dcd
docker-compose down
dcl
docker-compose logs -f
dcr
docker-compose restart
dps
docker ps
dstop
docker stop

Git Workflow

gst
git status
gaa
git add --all
gcm
git commit -m
gp
git push
gl
git pull
gco
git checkout
gcb
git checkout -b
glog
git log --graph
gstash
git stash

Quick Navigation

..
cd .. (up one level)
...
cd ../.. (up two levels)
....
cd ../../.. (up three levels)
~
cd ~ (go home)

System Utilities

cpwd
Copy current path
fhere
Open Finder here
showfiles
Show hidden files
hidefiles
Hide hidden files
zshconfig
Edit .zshrc
zshreload
Reload config

🔧 Custom Functions

mkcd()

Utility

Tạo và vào thư mục mới

mkcd new-project
# Creates directory and cd into it

backup()

Utility

Backup file với timestamp

backup config.php
# Creates config.php.backup.20250129_143000

port()

Debug

Find process on port

port 3000
# Shows process using port 3000

killport()

Debug

Kill process on port

killport 3000
# Kills process on port 3000

search-replace()

Advanced

Search và replace in files

search-replace 'old-text' 'new-text'
# Replaces in all files

restart-nginx()

Server

Restart server services

restart-nginx
restart-php
# Customize for your VPS

💡 Pro Tips

🎯

Autosuggestions

Gõ vài ký tự đầu của lệnh cũ, thấy gợi ý màu xám

Press to accept
🚀

Z Plugin Magic

Sau vài lần cd, plugin z sẽ học pattern

z wordpress # Jump instantly
🔐

Sudo Shortcut

Quên sudo? Double ESC để thêm vào lệnh

ESC ESC adds sudo
🔍

History Search

Search trong command history

Ctrl + R reverse search
📋

View All Aliases

Xem tất cả aliases có sẵn

alias
alias | grep git
alias | grep docker
📦

Extract Anything

Plugin extract tự nhận format

x file.zip
x archive.tar.gz
x data.rar

⌨️ Keyboard Shortcuts

Navigation

Move to start Ctrl + A
Move to end Ctrl + E
Move word left Alt + ←
Move word right Alt + →

Editing

Delete word Ctrl + W
Clear line Ctrl + U
Clear screen Ctrl + L
Cancel command Ctrl + C