Repository navigation
v7.1.2: Completion scripts treat candidates as plain text; mounted commands stop inheriting top-level completers
Latest
Immutable
release. Only release title and notes can be modified.
Generated bash, zsh and fish completion scripts no longer expand completion candidates or file extensions as shell code. Mounted commands also stop picking up the mounting spec's top-level completers. The first fix matters for tools like mise, where candidates can come from project files. Regenerate any completion files you've installed to get the script fixes.
Fixed
- (complete) Completion candidates and extension filters are now handled as plain text in every shell (#1581, @jdx):
- bash:
usage generate completion bashused to pass candidates throughcompgen -W, which expands them as shell input. Arun=completer that printed$(touch pwned)ran that command when you pressed Tab, and a*candidate turned into the files in the current directory. Thecompletion-inithandler had the same globbing problem. Both now read one candidate per line without expanding it, so a candidate that contains a space stays one entry instead of splitting in two. - zsh: extension names were inserted directly into the
_files -gpattern, and zsh runs glob qualifiers as code. The pattern is now built only from plain extension names (letters, digits,_ . + -). If no usable names are left, completion falls back to unfiltered_files. This also fixes a single extension, which produced*.(toml)and matched nothing. It now produces*.toml. - fish: extensions are matched as a literal suffix, so a
*or?in an extension no longer matches extra files.
- bash:
Changed
- (complete) A command brought in by
mountnow uses only the completers it declares itself, in its owncompletenodes or inside itsargnodes (#1581, @jdx). Before, a mounted argument that shared a name with a top-level completer (for example<tool>) used the mounting spec's completer, even when the mounted command declared its own. If you type one of the mounting CLI's flags inside a mounted command, its value still completes the same way it does outside the mount. Specs without mounts are unaffected. If a mounted command relied on a top-level completer, declare it in the spec that the mount emits instead, for example withcomplete "tool" run="..."inside thecmd.
Full Changelog: v7.1.1...v7.1.2
💚 Sponsor usage
usage is built and maintained by @jdx, an open source developer at entire.io, the title sponsor of his open source work.
If usage powers CLI specs, docs, or completions for a tool you maintain or use, please consider becoming an individual or company sponsor. Your support funds ongoing development and helps keep usage fast, free, and independent.