CMDLINER-TOOL-COMPLETION(1)

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

πŸ’… CMDLINER-TOOL-COMPLETION(1) β€” like, the whole manual, bestie

okay so this is a page from the Cmdliner Manual and it's genuinely so useful, so let's get into it ✨

🌸 NAME

cmdliner-tool-completion β€” spits out tool completion scripts, and honestly? iconic behavior.

πŸŽ€ SYNOPSIS

cmdliner tool-completion [--standalone-completion] [OPTION]… SHELL
TOOLNAME

yes bestie, that's two required little guys at the end: SHELL and TOOLNAME. no skipping them, periodt.

πŸ’– DESCRIPTION

so cmdliner tool-completion outputs the tool specific completion script for a given shell. it's giving "here's exactly what you asked for." example, look:

cmdliner tool-completion zsh mytool
⚠️ important caveat though β€” not me forgetting to mention it: the tool specific completion script needs the corresponding generic completion script (the one output by generic-completion) to already be loaded in the shell. so it doesn't work all by itself in the normal case. and hey, if you wanna actually install these scripts, go look at command install tool-completion, iykyk 🫢

πŸ¦‹ ARGUMENTS

  • SHELL (required) β€” this is the shell you want to support, and it must be one of bash, zsh or pwsh. that's the whole list, fr fr. πŸ’€
  • TOOLNAME (required) β€” the name of the tool you want to complete. that's it, that's the vibe check.

✨ OPTIONS

  • --standalone-completion β€” generates standalone completion scripts. these bad boys don't depend on the generic cmdliner completion scripts at all, which is lowkey great. but heads up: for some shells this may result in slower completion 😭 tradeoff city.

πŸ’… COMMON OPTIONS

  • --help[=FMT] (default=auto) β€” shows this help in format FMT. and 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. main character formatting moment πŸ’«
  • --version β€” shows version information. simple, slay, no notes.

πŸ”₯ EXIT STATUS

cmdliner tool-completion exits with:

  1. 0 β€” on success πŸŽ‰
  2. 123 β€” on indiscriminate errors reported on standard error 😬
  3. 124 β€” on command line parsing errors πŸ™ˆ
  4. 125 β€” on unexpected internal errors (bugs) πŸ’€
ngl 125 is the "not my fault, it's a bug" one. respect.

🌈 SEE ALSO

  • cmdliner(1) β€” go read it, bestie, it's the whole fam 🫢

okay that's the whole page, no cap, every detail preserved πŸ‘‘ and just so we're official about it: this is Cmdliner v2.1.1, mwah πŸ’‹ stay completed, bestie πŸ¦‹β­πŸ’œ

πŸ“¦ where this page comes from