Repository navigation
usage 6.10.0 - #312239
Merged
Merged
usage 6.10.0#312239
Conversation
botantony
approved these changes
Sep 19, 2026
Contributor
|
馃 An automated task has requested bottles to be published to this PR. Caution Please do not push to this PR branch before the bottle commits have been pushed, as this results in a state that is difficult to recover from. If you need to resolve a merge conflict, please use a merge commit. Do not force-push to this PR branch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Created by
brew bumpCreated with
brew bump-formula-pr.Details
release notes
(help) Mark the default subcommand and optionally append its help page (#1424, @lu-zero). A visible
default_subcommandis now listed with(default)in the command list. The newdefault_subcommand_help #truesetting (Rust:#[usage(default_subcommand_help)]) appends the default child's own page after the parent's, soex --helpshows the default command's flags and args without hoisting them into the root grammar. Hidden defaults are neither marked nor appended,flatten_helpskips the append since it already inlines every child, andusage lintreportsdefault_subcommand_helpwithout adefault_subcommand. Supported in the Rust and Go help renderers. Fixes #1423.(go) Explicitly typed fields from
usage generate go(#1441, @zeitlinger). The repeatable--field-type KEY=TYPEflag binds a generated flag or argument key constant (for exampleFlagTimeoutorFlagRunTimeout) toint,int64,uint64,float64,bool, orduration(time.Duration); variadic entries become typed slices. Conversion happens once on the final resolved value after argv/env/default precedence and validation, and invalid values returnargv.CodeInvalidValue. Unknown keys, duplicate bindings, unsupported types, and valueless or count flags are rejected at generation time. Library callers getusage::go::generate_with_typesandValueType; unconfigured output is unchanged. Typed output requires the runtime from this release (argv.NativeInt).(go)
argv.RenderRequestrenders help and version requests (#1439, @zeitlinger). Go applications no longer need to rebuild the command chain and pick a renderer themselves: pass the parser'sCodeHelp/CodeVersionerror, the help metadata, root command, and the same words given to the parser, and get back the rendered text. It handles short, long, and recursive help plus short/long version (falling back toVersionwhenLongVersionis empty), preserves invoked aliases and shared-command ancestry, and includes inherited globals from the correct route. Output, write errors, and exit status stay with the caller; ordinary errors return("", false).(spec) Environment variables in
includepaths (#1446, @jdx).Spec::parse_str_with_path_and_envaccepts an environment map soinclude file="$CONFIG_ROOT/shared.usage.kdl"expands$NAMEand${NAME}(with$$for a literal dollar sign) without mutating the process environment. Undefined variables return a diagnostic, nested includes inherit the same map, and relative paths still resolve from the declaring file. Expansion applies only to include paths.(spec)
Spec::parse_str_with_path(#1443, @jdx). Callers that extract spec text from a larger file (script comments, a rendered template) can now say which file it came from, so relativeincludepaths resolve against it.FromStrstill rejects relative includes since it has no path to resolve them against.Fixed
Parsepreviously ignored the built-in-h/--helpand-V/--versionflags, so a CLI with required arguments reported a missing argument and one without could continue into normal execution. They now becomeCodeHelp/CodeVersionerrors that preserve the selected command and short/long spelling; declared flags that shadow the built-ins still bind normally, and disabled built-ins stay disabled. Regenerate your Go code to pick this up.argv.Walkkeeps the full help-topic command chain (#1440, @zeitlinger).Walk(root, []string{"help", "config", "ls"})resolvedCmdtolsbut leftChaincontaining only the root, so the help renderers selected the wrong page and dropped the topic's ancestors. The chain now follows the actual parsed route, including through commands shared by more than one parent.default_subcommand_help, a root flag declaredglobal(such as--color) appeared once under the root'sFlags:and again under the appended child'sGlobal flags:. The appended page now omits itsGlobal flags:section, in both the Rust and Go renderers.--when a refused flag could have been a value (#1430, @jdx).mise exec node --versiononly offeredtip: a similar argument exists: '--verbose', even thoughexeccan only take that value after--. Following clap's rule, the error now also printstip: to pass '--version' as a value, use '-- --version'when the command takes positionals and no--precedes the token, and either there is no close spelling match or a positional isdouble_dash = "required"/"automatic". Ordinary typos still get only the spelling suggestion, and nothing is offered once a--has already been typed or when the command takes no positionals. Related to jdx/mise#13202.str::parse::<Spec>()had no source text attached, so errors likeunsupported flag key bogus_keyrendered a caret under a blank line at1:1. The diagnostic now points at the offending line and column, which is what embedders such as mise show for a task'susagefield.debuginstead ofinfo(#1444, @jdx). It was the library's onlyinfo!call, so embedders whose loggers show info by default (mise, for every task run using a shared.usage.kdl) printed aninclude: /path/...line on every invocation.New Contributors
Full Changelog: jdx/usage@v6.9.1...v6.10.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
usagepowers 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.View the full release notes at https://github.com/jdx/usage/releases/tag/v6.10.0.