Skip to content

chore(deps): update usage-rs to 7.1.3 - #121

Closed
sweepies-ops[bot] wants to merge 1 commit into
mainfrom
patchula/usage-rs-7.x
Closed

sweepies-ops[bot] wants to merge 1 commit into
mainfrom
patchula/usage-rs-7.x

Conversation

@sweepies-ops

@sweepies-ops sweepies-ops Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor
Package Change Type File
usage-rs 7.0.1 → 7.1.3 minor crates/cli/Cargo.toml

usage-rs

Source · Compare changes

Release notes: 7.0.1 → 7.1.3 (5 releases)

7.1.3

display_order on a subcommand now sets where its whole help section appears, not just its position within the section. Before this, the ungrouped Commands: section, which holds the built-in help, always came first.

Fixed
  • (cli) CLIs that group subcommands with help_heading can now put the default Commands: section after their named sections (#1583, @‍jdx). Each section is placed according to the lowest display_order among its commands. A command without a display_order counts as 999, so the built-in help never moves its section forward. Sections with the same value keep their current order. usage-argv runtime help and the usage-lib reference renderer both follow this rule.

    enum Cmds {
        #[usage(display_order = 99)]
        Completion(NoArgs),
        #[usage(help_heading = "Source", display_order = 1)]
        Fmt(NoArgs),
        #[usage(help_heading = "Dependencies", display_order = 2)]
        Fetch(NoArgs),
    }

    Help used to list Commands: (completion, help), then Source:, then Dependencies:. It now lists Source:, Dependencies:, then Commands:.

    If none of your commands set display_order, help looks the same as before. If you set display_order on grouped commands but not on ungrouped ones, the ungrouped section now appears last.

Full Changelog: jdx/usage@v7.1.2...v7.1.3

💚 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.

7.1.2

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 bash used to pass candidates through compgen -W, which expands them as shell input. A run= completer that printed $(touch pwned) ran that command when you pressed Tab, and a * candidate turned into the files in the current directory. The completion-init handler 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 -g pattern, 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.
Changed
  • (complete) A command brought in by mount now uses only the completers it declares itself, in its own complete nodes or inside its arg nodes (#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 with complete "tool" run="..." inside the cmd.

Full Changelog: jdx/usage@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.

7.1.1

Nushell completion scripts generated by usage-argv and the Go runtime no longer print a deprecation warning on nushell 0.116.

Fixed
  • (complete) Nushell 0.116 deprecated external completers that take a positional spans argument, so the generated script printed a nu::shell::deprecated warning every time it completed (#1570, @‍jdx). The completer now uses the {|place|} signature. On 0.116 it reads the tokens from $place.command, and on older nushell releases, which pass the token list directly, it uses that list. If you already had an external completer installed, it still gets called, and it receives the input in the format it expects: the token list for completers written with spans, the original input for everything else. If you saved the script to a file, regenerate it to pick up the fix.

Full Changelog: jdx/usage@v7.1.0...v7.1.1

💚 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.

7.1.0

This release adds usage-spec-effect, a new npm package that turns Effect v4 effect/cli command trees into usage specs. It also fixes bash completions from usage-argv, which could pass the command a different value than the one offered when a candidate contained quotes, spaces or other shell syntax.

Added
  • (spec) usage-spec-effect exports a usage spec from an Effect v4 effect/cli command tree (#1564, @‍jdx). Effect still parses and runs the CLI, and the spec drives shell completions, markdown docs and man pages. It requires effect 4.x.

    npm install usage-spec-effect
    import { generate } from "usage-spec-effect";
    
    if (process.argv.includes("--usage-spec")) {
      process.stdout.write(generate(app, { version: "1.0.0" }));
      process.exit(0);
    }
    mycli --usage-spec | usage generate completion bash mycli --file -

    The exporter handles nested subcommands, aliases, unlisted commands, examples, shared flags (exported as global), flag aliases, boolean and valued flags, choices, defaults, and optional and variadic args. Some constructs can only be exported approximately: orElse alternatives, file, redacted and key-value types (exported as strings), non-primitive defaults, and flags with an optional value. generateWithReport returns these in an unsupported list so they aren't dropped without notice. Effect's public Command type doesn't expose flags or arguments, so the exporter reads the command's runtime config. If a future Effect release changes that shape, generate throws an error that names the command. See the Effect integration guide.

Fixed
  • (bash) usage-argv and usage-dynamic now escape bash completion candidates so the command gets the value that was offered (#1566, @‍jdx). Before this fix, Readline put candidates on the line unescaped, so a candidate like tasks."hello.sh" reached the command as tasks.hello.sh, and it's here left an unclosed quote on the line. Candidates are now backslash-escaped. When a quote is already open in the word (', " or $'), each candidate is escaped for that quote style instead. Path completions still use Readline's own filename quoting, and zsh and fish were already correct. Hosts handling __complete_word__ should call render_request(&answer, &request) instead of render(&answer, shell) so the open-quote state is used. App::completion_request in usage-dynamic already does this. The script-based bash completions behind usage complete-word are unchanged, since compgen -W can't carry spaces or quotes in candidates.

Full Changelog: jdx/usage@v7.0.2...v7.1.0

💚 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.

7.0.2

Two completion fixes: completing a script now uses the same .<script>.usage.kdl sidecar spec that usage exec runs with, and short flags show their help text in completion menus.

Fixed
  • (complete) usage complete-word -f <script> now reads a .<script>.usage.kdl file next to the script before falling back to its USAGE comments, the same lookup usage exec already did (#1558, @‍jdx). Before this, a script with a sidecar completed against the comment spec, or against nothing at all. The bash, zsh and fish scripts from usage generate completion-init call complete-word, so they get the fix without being regenerated. Other usage generate subcommands that take -f <script>, such as completion and markdown, now prefer the sidecar too. When the sidecar doesn't set name or bin, the script's basename is used. Inline specs and stdin input work as before.

The Count left some release notes out to keep this description short; read them all.

  • Tick this and the Count will look at it again on the next run.
  • Add to the Count's batch PR. This one closes and the update moves there.

View guided diff Turn on auto-fix

Patchula: v1
Patchula-Branch: c3ab909e584db753cd67cfce84c985288d1b19f934fd1bd043839c9d1e7cc5c7
Patchula-Base: c1bac95
Patchula-Plan: 42727ed1395786e2f1f640b1c1ad2428a30363dde6f9d49b15f5111a480f6366
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedcargo/​usage-rs@​7.0.1 ⏵ 7.1.3981009310080

View full report

@deepsource-io

deepsource-io Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in c1bac95...edc8f66 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Rust Oct 31, 2026 4:04a.m. Review ↗
JavaScript Oct 31, 2026 4:04a.m. Review ↗
Shell Oct 31, 2026 4:04a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@sweepies-ops

sweepies-ops Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

Batched by the Count into #127. Tick this update's box there to bring it back.

@sweepies-ops sweepies-ops Bot closed this Oct 31, 2026
@sweepies-ops
sweepies-ops Bot deleted the patchula/usage-rs-7.x branch October 31, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants