Skip to main content

Zsh Ecosystem

The zsh framework (oh-my-zsh) and the vendored zsh plugins this repo ships with.

Tip 30.1: oh-my-zsh

Loads the andrelin theme plus the plugin set in source/90_oh-my-zsh.zsh — that file is the source of truth.

Highest-leverage shortcuts:

z foo # cd to most-used dir matching "foo" (z plugin)
Esc Esc # prepend "sudo " to the current command (sudo plugin)
web-search google "query" # open a search in your browser (web-search plugin)

Enabled plugins, grouped to make the list scannable. Each name links to its upstream docs.

Per-tool plugins

Aliases and/or tab-completion for one specific CLI. Skip the rows whose tool you don't use.

PluginKey aliases / commands
1passwordopswitch (switch account), opurl <item> (open URL). Needs the op CLI — bundled with the 1Password desktop app on macOS.
brewCompletions only — brew, brew cask, brew services.
dockerCompletions + dbl (build), drm (rm), drmi (rmi), dst (stats).
docker-composedco (compose), dcup/dcupd (up / up -d), dcdn (down), dcl/dclf (logs / logs -f), dcb (build), dce (exec), dcps (ps), dcrun (run).
ghCompletions only — pulled from gh completion -s zsh and cached. Pairs with Tip 12.1.
gitMassive alias set. Daily drivers: gst, gco, gcm (checkout main), gcb (checkout -b), gp, gl, gca, glola (pretty graph log).
git-extrasCompletions for git-extras commands (git delete-branch, git changelog, git ignore, …).
gradleCompletion for Gradle tasks in the current project's build.gradle. gw (gradle wrapper).
kubectlk, kgp (get pods), kgs (svc), kgd (deployments), kdp <pod> (describe), kl <pod> (logs), keti <pod> bash (exec interactive).
mvnmci (clean install), mcp (clean package), mt (test), mvn-color (colourised wrapper).
npmnpmg (global), npmS/npmD (install --save / --save-dev), npmO (outdated), npmL (list --depth=0).
pipCompletions sourced from PyPI's package list (cached). pip-update upgrades everything installed.
pythonmkv (mkvirtualenv), vrun (workon), pyfind (find .py), pyclean [path] (remove __pycache__, .pyc/.pyo, .mypy_cache, .pytest_cache).
sublimest <file> (open file), st . (open cwd as project), stt (open cwd in new window).

General shell utilities

Don't tie to one tool — useful in any shell session.

PluginWhat it does
alias-finderPrints any matching alias when you type a long command (alias-finder "git status"gst). Helps internalise the alias surface.
colored-man-pagesColourises man output. Automatic — no commands.
colorizeSyntax-highlighted file viewing via Pygments / chroma. ccat file.py, cless file.py.
command-not-foundOn Ubuntu/WSL, suggests the apt package for a missing command. No-op on macOS.
encode64encode64 "hello", decode64 "aGVsbG8=". Handy for JWTs (split on ., decode each segment) and basic-auth tokens.
extractextract <archive> for any common format (tar variants, zip, 7z, xz, zst, lz, rpm, deb, …). Overrides the narrower extract() in source/40_functions.sh, which stays as a fallback.
macos (macOS only)Finder/iTerm helpers: tab, ofd (open Finder here), cdf (cd to Finder), quick-look <file>, pfd (path of frontmost Finder).
safe-pasteStops pasted text from auto-executing if it contains a newline. Defends against malicious clipboard snippets. Zero-config.
sudoEsc Esc toggles sudo on the current line (or prepends to the previous command if the line is empty).
urltoolsurlencode "a b&c", urldecode "a%20b%26c". Pair with encode64 for HTTP/OAuth poking.
web-searchgoogle "query", ddg "query", bing "query", github "query", stackoverflow "query", …
zFrecency-based directory jumping. z foo cd's to the most-used dir matching "foo"; z -l foo lists candidates.

Full plugin index (for adding new ones): https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins

Tip 30.2: zsh-autosuggestions

As you type, suggests completions in grey based on history. Press (right arrow) or End to accept.

git che█eckout main # ← type "git che", grey suggestion shows "ckout main"

Sourced from vendor/zsh-autosuggestions/. Repo: https://github.com/zsh-users/zsh-autosuggestions

Tip 30.3: zsh-syntax-highlighting

Real-time colouring of commands as you type. Valid commands turn green, invalid red, strings get their own colour. No commands to learn — it just works.

Repo: https://github.com/zsh-users/zsh-syntax-highlighting

Tip 30.4: zsh-completions

Extra Tab-completion definitions for many CLI tools beyond zsh's built-ins. Activates automatically; press Tab and feel the difference.

Repo: https://github.com/zsh-users/zsh-completions

Type a partial command, hit to walk through every history entry containing that substring (and to walk back). Faster than Ctrl+R for "I ran something with kubectl logs last week" recall.

kubectl logs█ # ← type prefix, then ↑ to cycle through matching history

Vendored separately (not via omz) because it must load after zsh-syntax-highlighting, while omz plugins all load earlier in source/90_oh-my-zsh.zsh. See the load order in source/99_zsh-modules.zsh.

Repo: https://github.com/zsh-users/zsh-history-substring-search