>_ZSH-MORE-COMPLETIONS
Every CLI you've heard of, completed. Plus several you haven't. The largest curated zsh completion corpus in existence. Most files were auto-generated by Python scripts that parse --help output, man pages, and upstream argument parsers (clap derive, argparse, Getopt::Long, urfave/cli, cobra, Click, Kong, …). All have been cleaned, verified, and validated by a large zunit suite. The upstream source URL is embedded in every completion file.
All numbers on this page are produced by zsh scripts/print-repo-stats.zsh — the authoritative metric source. Nothing is hand-typed. If the figures here differ from a freshly-run script, the script is right and this page is mid-cadence.
Install
# Zinit (recommended) -- nocompletions ice keeps fpath order correct
zinit ice lucid nocompile wait'0e' nocompletions
zinit load MenkeTechnologies/zsh-more-completions
# Oh My Zsh -- needs explicit nested-dir fpath wiring before compinit
git clone https://github.com/MenkeTechnologies/zsh-more-completions \
"$HOME/.oh-my-zsh/custom/plugins/zsh-more-completions"
# plugins+=(zsh-more-completions)
# plus the fpath snippet from the README -- OMZ does not add nested *src dirs
# Manual
git clone https://github.com/MenkeTechnologies/zsh-more-completions
# copy _* files from src/, more_src/ .. more_src8/, man_src/, override_src/, architecture_src/
# to somewhere on your fpath, then: autoload -Uz compinit && compinit
Why nocompletions matters under Zinit: by default Zinit symlinks every _* file it finds into one flat completions/ directory. That collapses the per-source-dir grouping and breaks override_src/ precedence (override files no longer win against the rest). The nocompletions ice tells Zinit to leave the files where they are; the plugin's own entrypoint splices the 12 directories onto $fpath in the correct order at source time.
Why Oh My Zsh needs extra wiring: OMZ adds a plugin's top-level directory to $fpath, but it does not descend into nested *src/ subdirectories. Without the fpath snippet from the README, compinit never sees the 47,316 files. OMZ also requires compinit to run twice — once in OMZ's own startup and once after this plugin sources — for the appended directories to take effect (documented inline in zsh-more-completions.plugin.zsh).
Boot sequence
# initialize compsys autoload -Uz compinit && compinit # faster boot: skip the security check and load the cached dump compinit -C
The plugin itself never calls compinit — it only puts directories on $fpath. Choosing when (and how) to initialize completion is the user's job, so the corpus works with any init strategy: lazy, eager, or a cached ~/.zcompdump.
compinit | Walks every directory on $fpath, indexing each file's #compdef line. First run is the expensive one (it also runs a security check on the fpath dirs). |
compinit -C | Skips the security check and loads the cached ~/.zcompdump dump. Sub-100 ms even against this corpus — the recommended interactive boot path. |
| First tab on a command | zsh autoloads only that one _NAME file on demand. A session that tabs against 50 commands sources 50 files, not 47,316 — the corpus is large but the load is lazy. |
Directory layout
12 fpath-prefixed source directories. override_src/ is prepended so its 10 hand-maintained files win against everything else; the remaining 11 are appended in load order (first match wins for any given _NAME). The more_src split is purely a filesystem-performance decision — some tools degrade past ~10k entries per directory (find walks, git index renames, zsh's own dir scan), so the corpus is spread across siblings to keep each comfortably under the ceiling.
override_src/ | 10 files, prepended to fpath — hand-maintained completions that must beat system / OMZ / sibling completions |
src/ | 8,360 files — main, mature, first-class completions; rarely re-generated |
more_src/ | 13,058 files — additional completions, same shape and provenance as src/ |
more_src2/ .. more_src8/ | 4,497 / 3,788 / 5,244 / 3,717 / 3,977 / 100 / 100 files — further additional completions (seven-way split to stay under the ~10k-files-per-dir ceiling) |
man_src/ | 3,398 files — completions parsed from system man pages where no --help + parser exists |
architecture_src/ | 1,067 files — cross-architecture toolchains (aarch64-apple-darwin*-gcc-*, arm-none-eabi-*, x86_64-w64-mingw32-*, riscv64-linux-gnu-*) |
Per-directory totals come from scripts/print-repo-stats.zsh; they shift on every harvest run. The Engineering Report carries the full breakdown plus the fpath-order rationale.
Harvested ecosystems (sample)
arm-none-eabi-* 20 binaries)Stats
Counts change constantly — do not edit totals by hand. From the repo root:
zsh scripts/print-repo-stats.zsh
Prints _-prefixed completion file counts per directory (src, more_src..more_src8, man_src, override_src, architecture_src), total_completions, and zunit_tests (number of @test entries under tests/). At the current HEAD that is 47,316 completion files and 23,112 tests.
Completion file shape
Every _NAME file follows the same shape: a #compdef NAME first line, a comment header carrying the upstream provenance URL + harvest timestamp, then an _arguments / _values body whose specs are derived from the upstream argument parser. There is deliberately no trailing compdef _NAME NAME call — that would force the file to evaluate at compinit time instead of being lazily autoloaded on first tab.
#compdef <name> | Required first line. Tells zsh which command this completion is for; compinit indexes from it. |
| Provenance header | Required comment block with the source URL + harvest timestamp. Survives zsh -nf as comment-only content; lets anyone trace _xyz back to its upstream project. |
_arguments body | Typical: flag-and-arg dispatch via zsh's _arguments builtin, specs derived from the upstream parser. |
_values body | Used where a command has a fixed value set rather than a flag surface; often subcommand dispatch. |
No trailing compdef | Required negative. The file is data, not a re-registration call — fpath does the indexing. |
How the corpus is built (harvest pipelines)
Most files are auto-generated by 6 Python harvest scripts in scripts/ (3,361 LOC total). Each targets a different upstream registry, validates every capture, header-stamps provenance, records the stem in blacklist.txt, and appends an existence pin to the matching tests/t-*-existence*.zsh. These scripts are maintainer-only — the runtime is pure zsh and needs no Python.
harvest-web-completions.py | GitHub tree / code-search across repos listed in harvest-tree-repos.txt — the largest pipeline (1,053 LOC) |
harvest-crates-completions.py | crates.io reverse-deps of clap_complete; cargo-binstall + a probe ladder of completion zsh subcommands (611 LOC) |
harvest-gh-releases.py | gh api latest releases, smallest archive asset, curl off the CDN, extract + walk for _* (492 LOC) |
harvest-apt-completions.py | Debian sid Contents-arm64.gz index, grep for shipped completions, apt-get download in a Debian container (410 LOC) |
harvest-nix-completions.py | Docker-isolated nix-build of packages using the install-shell-completion macro; resumable via progress.txt (401 LOC) |
harvest-brew-completions.py | brew fetch + tarball stream-extract of site-functions/_*, no install side-effects (394 LOC) |
Every capture passes the same gate before landing: dedup against src/ / more_src*/ / blacklist.txt; reject cobra runtime-dispatch stubs; strip any trailing compdef line; parse with zsh -nf; stamp the provenance header; record the stem in the blacklist; append the existence test. The blacklist.txt (46,937 entries) is the corpus's negative space — every name a harvester rejected, so re-runs converge instead of re-probing.
Override completions
override_src/ is prepended to $fpath so its 10 files win against the upstream zsh-completions corpus, OMZ-shipped completions, and the 11 sibling directories in this same plugin. These are hand-maintained, not harvested.
_git / _git-clone | Extended git completion with subcommand-level depth; standalone clone completion with URL / shorthand-host handling |
_curl | curl's large, fast-moving flag surface kept current ahead of upstream |
_whois | Custom TLD list + per-TLD whois-server hints |
_lftp | Extended for the author's lftp scripting patterns |
_cheat / _gdu / _express | cheat cheatsheets, gdu disk-usage flags, express-generator scaffolder |
_claude / _stryke | Claude CLI (Anthropic) and strykelang's own CLI — updated as new flags ship |
Testing & CI
The corpus is validated by a zunit suite of 23,112 @test cases across 21 tests/*.zsh files, plus 21 tests/*.sh doc / repo-hygiene gates. CI runs zunit tests/*.zsh on Ubuntu via .github/workflows/ci.yml.
| Existence pins | One @test per completion file in the matching t-*-existence*.zsh. CI fails the moment a file is deleted without removing its test line — the corpus can't silently shrink, and wrong-case basenames are caught on Linux. |
| Bulk quality | t-bulk-quality.zsh pins corpus-wide rules: every file starts with #compdef, no trailing compdef call, header stamp present. |
| Options / commands | t-src-options.zsh + t-src-commands.zsh pin the flag and subcommand inventory of high-traffic completions so harvest re-runs can't silently regress them. |
| Repo invariants | t-repo-invariants.zsh pins blacklist.txt integrity (no duplicates, no leading whitespace, >1000 entries), the CI workflow contract, license.md presence, and the absence of tracked .zwc artifacts. |
Troubleshooting
| Completions don't appear under OMZ | OMZ doesn't descend into nested *src/ dirs. Add the fpath snippet from the README before compinit, and let compinit run twice (once in OMZ, once after this plugin sources). |
| Override completion isn't winning | Under Zinit, ensure the nocompletions ice is set so Zinit doesn't flatten everything into one symlinked directory and clobber override_src/ precedence. |
Slow first compinit | The first run indexes every fpath dir and runs a security check. Use compinit -C on subsequent boots to load the cached ~/.zcompdump and skip the check. |
| Stale completion after upstream changes | Each file carries its provenance URL in the header. Re-harvest is maintainer-driven; the corpus reconciles against print-repo-stats.zsh output, never hand-edited totals. |
Sibling plugins
Part of the MenkeTechnologies zsh plugin family — the MenkeTechnologiesMeta umbrella:
- zsh-better-npm-completion — cache-aware
npm installcompletion - zsh-cargo-completion — live
cargo add/cargo installcompletion - zsh-cpan-completion — live MetaCPAN
cpan/cpanmcompletion - zsh-dotnet-completion — dotnet CLI completion
- zsh-expand — spacebar expansion (11,683 tests)
- zsh-gem-completion — ruby
gem installremote completion - zsh-git-acp — 159 git aliases + add/commit/push keybindings
- zsh-git-repo-cache — index every git repo on disk
- zsh-learn — MySQL-backed learning collection / quiz
- zsh-nginx — nginx commands + service-wrapper aliases
- zsh-pip-description-completion — pip remote completion with descriptions
- zsh-sed-sub — in-place sed substitution on the command line
- zsh-sudo — ESC ESC to prepend sudo
- zsh-xcode-completions — xcodebuild / xcrun / swift completion