Expand description
The one-line summary of how a command is invoked.
Usage: mise use [OPTIONS] <TOOL@VERSION>… — the line at the top of --help, and the
first thing a CLI framework has to be able to produce.
Built from the same &'static metadata a parse ignores, so a binary that never asks for
help pays nothing for being able to. Nothing here is on the hot path.
§Matching usage-lib
usage-lib renders this from a spec, through a tera template over a runtime model. This
crate cannot: there is no Spec at run time, only the tables. So the rules are
reimplemented, and the test that matters compares the two outputs over every command in
mise’s real spec — 211 of them — because an adopter’s help text changing is a visible
regression even when it is a small one.
Where the two disagree the difference is recorded, in the same spirit as the parser’s corpus: usage-lib is the reference, and a divergence is a decision rather than an accident.
Structs§
Enums§
- Page
- Which page a help request asks for.
Constants§
- SECTIONS
- The sections a
help_templatemay name. - STYLES
- The styles accepted in a help template.
Functions§
- find
- The path and metadata for a command, found by identity within a spec.
- long_
help - Everything
--helpprints. - page
- The page a help request becomes, by the route the words took.
- page_
view - The page a help request becomes when a declared executable view is what the user invoked.
- render
- The page a help request asks for, ready to print.
- render_
all - Long help for a command and every visible descendant, in depth-first order.
- render_
all_ at - Recursive long help for a command reached by a known route.
- render_
all_ at_ styled - Route-specific recursive long help with an explicit colour policy.
- render_
all_ styled - Recursive long help with an explicit colour policy.
- render_
all_ view_ at_ styled - Recursive long help through a spec-declared executable view.
- render_
at - render_
at_ styled - Render a route-specific help page with an explicit colour policy.
- render_
styled - Render a help page with an explicit colour policy.
- render_
topic - Render one addressable help topic by its
Topic::idor visible title. - render_
view_ at_ styled - Render help through a spec-declared executable view.
- route_
to - The route the words took to a command, for rendering its page unambiguously.
- route_
to_ view - Recover a command route from the full argv of a declared executable view.
- short_
help - Everything
-hprints. - topics
- List the addressable topics on one command’s short or long help page.
- unsupported_
section - The first placeholder in a template that names no section, if there is one.
- usage_
line - The
Usage:line’s body, without theUsage:prefix.