Vinsælt: Gögn uppfærð 27. október 2026

Flokkar

Internet1.356
Samskipti321
Hljóð og mynd898
Grafík og hönnun539
Skrifstofa og afköst1.124
Forritunartól3.134
Gervigreindartól529
Öryggi og persónuvernd385
Kerfistól3.114
Leikir523
Menntun og vísindi239
Net og upplýsingatækni284

Sækja usage 6.9.0

A specification for CLIs

Þetta er eldri útgáfa. Nýjasta útgáfan er 7.0.1. usage 7.0.1 · Gefið út:

Uppsetningarskrár 6.9.0

HögunGerðUmfangSkráarstærðSækjaSHA256
64 bita ZIP → Ferðaútgáfa — — github.com VirusTotal
ARM64 ZIP → Ferðaútgáfa — — github.com VirusTotal

Tengillinn og SHA256-gildið koma úr samfélagslýsingu Windows-pakkastjórans (winget). Berið gildi sóttu skrárinnar saman við það áður en hún er keyrð.

Útgáfuupplýsingar

Flags belonging to a default subcommand can now select it without typing its name, a derived Args type can be parsed on its own, help colours can be remapped, and a series of help-rendering changes trims binary size for usage-rs adopters. Bash completion also stops mangling colon-separated candidates.
Added
- (parse) Opt-in default-subcommand flag routing (#1413, @jdx). With default_subcommand_flags, leading flags that belong only to the configured default subcommand route to it, so em -ua @world parses as em install -ua @world. Explicit command names and aliases still win, parent-only flags and bare invocations stay on the parent, a mixed short bundle such as -pua keeps the parent's -p, and -- or an unknown flag stops the lookahead. Completion also offers the default command's flags at the root. Supported in KDL specs, the Rust derive, and the Go runtime; existing routing is unchanged without the opt-in. usage lint reports default_subcommand_flags declared without a default_subcommand.
default_subcommand "install"
default_subcommand_flags #true
#[usage(default_subcommand = "install", default_subcommand_flags)]
- (parse) Parse a derived Args type without an enclosing CLI (#1419, @jdx). usage::parse_args_from::<T> treats the slice as that command's words; usage::parse_args_from_argv::<T> strips argv0 first. Both reuse the command's compiled flags, positionals, defaults, validation, and nested subcommands, and return the ordinary parse errors, including help and version requests. Available behind the spec feature.
let install = usage::parse_args_from::<Install>(&args)?;
- (help) Remap semantic help colours with a Palette (#1414, @lu-zero). The heading, option, metavar, and command roles were previously fixed SGR colours. help::Palette remaps any of them using the existing {$…} tag vocabulary (for example "cyan+bold"), and Style::palette applies it; role names expand once, so mapping metavar to "heading" uses the built-in heading colour. Hosts that own the exit path get embedded_outcome_paletted / embedded_outcome_into_paletted (and embedded::outcome_paletted); parse() and plain rendering are unchanged.
let palette = usage::help::Palette::DEFAULT.metavar("cyan+bold");
match Ex::embedded_outcome_paletted(&argv, palette) { /* … */ }

Changed
- (cli) Smaller binaries and faster help rendering (#1396, #1399, #1400, #1401, @jdx). Help sorting and rendering do less work and share more code, plain (uncoloured) help skips colour-span analysis, and the flag diagnostics share one formatter. Help output is byte-identical; on the oxc binaries used for measurement this removed roughly 360 KiB combined, and plain --help rendered about 18% faster locally. Two new opt-ins let CLIs trim further:
- Flattened subcommand pages, HelpAll, and recursive render_all now live behind a help-advanced feature (enabled by default in usage-rs and usage-argv). A CLI that uses none of them can disable defaults and omit it:
usage = { package = "usage-rs", version = "6", default-features = false, features = ["help", "diagnostics", "completions"] }
- #[usage(spec_endpoint_file = "cli.usage.kdl")] answers __usage_spec__ from a KDL file included at compile time, keeping the endpoint without linking the runtime serializer. to_kdl() still generates from live metadata, so regenerate the file after CLI changes and test the two for drift.
Compatibility note: dependents that already set default-features = false and declare flatten_help or a HelpAll flag must add help-advanced; the derive now rejects those declarations at compile time, and hand-written metadata requesting advanced help panics when rendered instead of being silently ignored.

Fixed
- (bash) Preserve colon-prefixed completion words (#1405, @jdx). When : is in COMP_WORDBREAKS, Readline replaces only the fragment after the last colon, so candidates such as update:deps:no-cooldown were inserted with a duplicated update:deps: prefix. The generated Bash script now forwards the current Readline word and COMP_WORDBREAKS to the __complete_word__ request, and the binary reports the prefix Readline keeps so the script can trim it; escaped colons, consecutive colons, and a cursor on a colon are handled. Path candidates are unaffected. Regenerate Bash completion scripts to pick up the fix (reported in jdx/mise#12970).

New Contributors
- @lu-zero made their first contribution in #1414

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

https://github.com/jdx/usage/releases/tag/v6.9.0

Vinsælast í flokknum Skjáhermar og skipanalínutól

Sjá allt
  1. PowerShellSkjáhermar og skipanalínutól · Microsoft Corporation
  2. QPDFSkjáhermar og skipanalínutól · QPDF
  3. Oh My PoshSkjáhermar og skipanalínutól · Jan De Dobbeleer
  4. Microsoft Azure CLISkjáhermar og skipanalínutól · Microsoft Corporation
  5. yqSkjáhermar og skipanalínutól · Mike Farah
  6. AlacrittySkjáhermar og skipanalínutól · Alacritty
  7. fzfSkjáhermar og skipanalínutól · Junegunn Choi
  8. PuTTYSkjáhermar og skipanalínutól · Simon Tatham
  9. cURLSkjáhermar og skipanalínutól · curl
  10. TabbySkjáhermar og skipanalínutól · Tabby Developers

Meira frá jdx

Sjá allt

Merki

Deila