CodeVetter · Repo Unpack · Feature catalog
ohmyzsh/ohmyzsh
User-facing surface = (a) the `omz` CLI with plugin/theme/update/pr/changelog subcommands, (b) a large catalog of plugins and themes enabled via zshrc variables, (c) lib features that reshape the interactive shell (directory stack aliases, history behavior, key bindings, completion tuning, clipboard helpers, terminal title/OSC7 integration, git prompt API), and (d) lifecycle tooling (install, upgrade, changelog, uninstall, diagnostics).
- `omz plugin enable|disable|info|list|load` manage the plugins array: enable/disable rewrite .zshrc with an awk program, back up to .zshrc.bck, syntax-check the result with `zsh -n`, and reload the shell; load sources a plugin for the current session only.
- `omz theme list|set|use` enumerate and switch themes; `set` rewrites the ZSH_THEME= line in .zshrc (or prepends one) with the same backup + `zsh -n` + rollback discipline as the plugin commands.
- `omz update` shells out to `zsh -f $ZSH/tools/upgrade.sh -i -v <mode> -c <days>`, writes LAST_EPOCH into $ZSH_CACHE_DIR/.zsh-update, removes the update lock, and execs a fresh zsh if HEAD changed.
- `omz pr test <N|URL>` fetches a pull request into branch ohmyzsh/pull-N, first querying api.github.com for the 'testers needed' label (node_id MDU6TGFiZWw4NzY1NTkwNA==) and requiring a typed 'yes' if the PR is unlabeled, then rebases onto master and spawns `zsh -l` for testing.
- `omz changelog` delegates to tools/changelog.sh, a Conventional-Commits parser that buckets subjects by type (feat/fix/perf/docs main; refactor/style/other grouped; chore/ci/etc ignored) and renders them per release.
- The git plugin (plugins/git/git.plugin.zsh) ships ~200 aliases plus functions like git_main_branch (probing main/trunk/mainline/default/stable/master then remote HEAD), git_develop_branch, and gbcopy (branch name to clipboard via clipcopy).
- ZSH_THEME='random' is implemented as a real theme file themes/random.zsh-theme: it gathers candidates from ZSH_THEME_RANDOM_CANDIDATES or the theme dirs minus ZSH_THEME_RANDOM_IGNORED, picks one with $RANDOM, sources it, and records it in $RANDOM_THEME.
- lib/directories.zsh enables auto_cd/auto_pushd and defines the `...`=`../..` global aliases, numeric `1..9`=`cd -N` aliases, `d` for the dir stack, and ls listing aliases (l, ll, la, lsa).
- lib/history.zsh replaces `history` with omz_history (supports -c clear with confirmation and HIST_STAMPS-driven date formats), sets HISTFILE=~/.zsh_history, floors HISTSIZE=50000/SAVEHIST=10000, and enables share_history/hist_verify.
- lib/completion.zsh configures the completer: matcher-list driven by CASE_SENSITIVE/HYPHEN_INSENSITIVE, menu select, use-cache into $ZSH_CACHE_DIR, ignored system users, COMPLETION_WAITING_DOTS spinner widget, and bashcompinit for bash completions.
- lib/termsupport.zsh auto-sets terminal/tab titles via title() on precmd/preexec (special-casing `fg` job resolution and sudo/ssh prefixes) and emits OSC 7 file://host/path cwd notifications via omz_termsupport_cwd, skipped under Emacs/SSH.
- lib/clipboard.zsh defines clipcopy/clippaste dispatching across pbcopy, cygwin, wl-copy, xsel, xclip, lemonade, doitclient, win32yank, and tmux depending on platform and WAYLAND_DISPLAY/DISPLAY/TMUX.
- lib/functions.zsh provides grab-bag utilities: take/mkcd/takedir (mkdir+cd), takeurl/takezip/takegit (download/extract+cd), open_command (cross-platform opener honoring $BROWSER), omz_urlencode/omz_urldecode, zsh_stats, and uninstall_oh_my_zsh.
- lib/diagnostics.zsh ships omz_diagnostic_dump, a defensive (builtin/command-prefixed) troubleshooting-report generator with -v/-V verbosity levels that cats config state into a single postable file.
- plugins/themes/themes.plugin.zsh adds an interactive `theme` command (default random) plus `lstheme` listing, and tools/theme_chooser.sh previews every theme interactively after sourcing oh-my-zsh.sh.