usage 5.0.0 - #297055
Merged
Merged
Conversation
iMichka
approved these changes
Aug 4, 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
Override the shell binary with
USAGE_SHELL_<SHELL>(#767 by @JamBalaya56562). Pointusage bash,usage zsh,usage fish, andusage powershellat a specific interpreter — mainly so Windows users can escape the WSLbash.exethat Win32's search order picks up ahead of$PATH:The variable is keyed by the program (so
powershell's override isUSAGE_SHELL_PWSH). Unset, empty, or whitespace-only falls back to the default. Spawn failures now name the program that was tried and the variable it came from, and on Windows abashexit 127 against a drive-letter path prints a hint pointing at this override.generate markdownwrites to stdout (#766 by @JamBalaya56562).--out-fileis now optional and defaults to stdout, matchingmanpage,fig,json, andcompletion.--out-file -also means stdout onmarkdown,manpage, andfig, mirroring the-f -input convention. Thewriting to …progress line moved to stderr onmarkdown,manpage,fig, andsdk, so it no longer ends up inside the generated document.--out-dirnow requires--multi.Fixed
double_dash="required"is now enforced on both sides (#762 by @JamBalaya56562). The parser previously ignoredSpecDoubleDashChoices::Requiredentirely — a word offered to such an arg without--was accepted anyway, and a required arg sitting behind a greedy variadic was unreachable even with a separator. Now offering a value before--is reported asArgRequiresDoubleDash(once per variadic, not once per word), and an explicit--routes the positional cursor onto the arg that required it, past earlier args. Completion learns about--too: while an arg is locked behind a separator,--itself is offered rather than values the parser would reject.Windows:
usage_*variables reach WSL bash (#764 by @JamBalaya56562). On Windows thebashpicked up from the system directory is WSL's launcher, and WSL only forwards a Win32 variable whenWSLENVnames it — so scripts saw everyusage_*value unset. Bothshellandexecnow append the parsed argument names toWSLENV(bare, no/por/lflags), preserving any entries the user had already configured.Windows:
run=scripts useshwhen available (#765 by @JamBalaya56562).complete run=already usedsh -ceverywhere, butmount run=usedcmd /con Windows, so the same POSIX one-liner behaved differently depending on which KDL node it lived in — and shebang scripts silently exited 0 with empty output. Both call sites now share one implementation:sh -cfirst, falling back tocmd /conly ifshis not found. Non-UTF-8 output from either shell is now reported as an error instead of panicking.Bash/fish completion guard ignores shell functions (#760 by @JamBalaya56562). The generated completion opens with a guard that bails out when the
usageCLI is not installed, buttype -preturns exit 0 for a shell function, so any environment defining ausagefunction (e.g. oh-my-bash) passed the guard and then failed further down with an unrelated error. Switched totype -Pin both bash guards and the fish equivalent; zsh'stype -palready forces a$PATHsearch and is unchanged.Breaking Changes
double_dash="required"positional args now reject values before--(#762). Specs where such an arg previously happened to work without a separator will now error. Inexamples/mise.usage.kdl, post---values also move from the preceding greedy variadic to the arg that declared the separator (e.g. fromTASK_ARGStoTASK_ARGS_LAST, fromTOOL@VERSIONtoCOMMANDunderexec), which changes whichusage_*variable a consumer reads. Spec authors who want the old permissiveness can drop back todouble_dash="optional"(the default).UsageErrandParseOutputgained fields.UsageErrhas a newArgRequiresDoubleDashvariant, andParseOutputgainednext_arganddouble_dash_seen. Library consumers matching these types exhaustively will need to update.Full Changelog: jdx/usage@v4.1.0...v5.0.0
💚 Sponsor usage
usage is maintained by @jdx, an open source developer for entire.io, the title sponsor of the jdx.dev open source tools including mise, aube, hk, and more. Work on usage is funded by sponsorships.
If
usagepowers CLI specs, docs, or completions for a tool you maintain or use, please consider sponsoring at jdx.dev. Every sponsorship helps the project stay independent and moving.View the full release notes at https://github.com/jdx/usage/releases/tag/v5.0.0.