CMDLINER-INS...L-COMPLETION(1)

πŸ“¦ version 2.1.1, in arch rolling, nixos 26.05, nixpkgs unstable

πŸ’… cmdliner-install-tool-completion(1) β€” like, the Cmdliner Manual bestie ✨

okay so real talk, this is a page from the Cmdliner Manual and it's all about cmdliner-install-tool-completion, which is genuinely one of those commands that just works so you don't have to. let's get into it 🫢


🌸 NAME 🌸

cmdliner-install-tool-completion β€” installs tool completion scripts. that's it, that's the vibe. ✨


πŸŽ€ SYNOPSIS πŸŽ€

cmdliner install tool-completion [OPTION]… TOOLNAME… SHAREDIR

πŸ¦‹ DESCRIPTION πŸ¦‹

so cmdliner install tool-completion is the main character here: it installs the tool completion script(s) for whatever tools and shells you hand it, into a share directory, and it follows the specific conventions each shell expects. directories get created if they don't exist already β€” no cap, it just does it. πŸ’–

want to peek before committing? use the --dry-run option and it'll show you which paths would be written. iconic. example time:

cmdliner install tool-completion mytool /usr/local/share  # All supported shells
cmdliner install tool-completion --shell zsh mytool /usr/local/share
heads up bestie πŸ™ˆ β€” the command install tool-support also installs completions, same as this command does. and if you want to actually inspect the scripts (not install them), use the tool-completion command instead. iykyk.

πŸ‘‘ ARGUMENTS πŸ‘‘

⭐ SHAREDIR (required)

SHAREDIR is literally just the share directory you're installing to. that's the whole job.

⭐ TOOLNAME (required)

TOOLNAME is the name of the tool you want to complete. and yes, it's repeatable β€” go off, list as many as you want πŸ’…


✨ OPTIONS ✨

  • --dry-run β€” do not install anything, just output the paths that would be written. a little preview moment, we love to see it πŸ‘€
  • -s SHELL, --shell=SHELL (absent = All supported shells) β€” the shell you want to support. it must be one of bash, zsh or pwsh. repeatable, so you can stack 'em up 🧚
  • --standalone-completion β€” generates standalone completion scripts. these scripts do not depend on the generic cmdliner completion scripts. fair warning though: for some shells this may result in slower completion 😭 (tradeoff queen)
  • --update-opam-install=PKG.install β€” updates or creates an opam .install file PKG.install, with install moves going from the installed files to the corresponding opam install sections. and yes, this also happens if --dry-run is specified. slay πŸ“

🌈 COMMON OPTIONS 🌈

  • --help[=FMT] (default = auto) β€” shows this help in format FMT. FMT must be one of auto, pager, groff or plain. with auto, the format is pager or plain whenever the TERM env var is dumb or undefined. (env var respecting behavior, we stan πŸ’œ)
  • --version β€” shows version information. periodt.

πŸ’€ EXIT STATUS πŸ’€

cmdliner install tool-completion exits with:

  1. 0 β€” on success. we love a clean win ✨
  2. 123 β€” on indiscriminate errors reported on standard error.
  3. 124 β€” on command line parsing errors.
  4. 125 β€” on unexpected internal errors (bugs). not me filing a bug report 😭

πŸ”₯ SEE ALSO πŸ”₯

cmdliner(1) β€” go read that one too, bestie 🫢


and that's the whole page, fr fr β€” no notes πŸ’–

okay so final sign-off: this gem is Cmdliner v2.1.1 and it lives in the Cmdliner Manual. go forth and complete all the things πŸ‘‘βœ¨πŸŽ€

πŸ“¦ where this page comes from