Expand description
Mise Usage spec from a clap command.
Mise Usage spec from a clap Command.
One hidden flag, one mount line, one operator form. A consumer writes
--usage-spec[=BIN] (hidden, require_equals). The served mise task
carries mount_directives, which ends with mount_line. Operators then
run mise run q status — no --.
The -- in the mount is only the completion bootstrap, as mise documents.
Lefthook calls the same task: mise run q close-from-git.
Functions§
- mount_
directives - The mise directives a served CLI-proxy task carries, ending with
mount_line.raw_argspasses argv through untouched.rawconnects the CLI to the caller’s stdin and stdout: without it mise relays each output line itself and, whenever its own colour is on (as underCLICOLOR_FORCE=1, even into a pipe), appends an SGR reset to every line, so--format jsonpiped tojqcarries an ESC byte the CLI never wrote. A raw task also gets no line prefix, and mise runs raw tasks one at a time. - mount_
line - The
#USAGE mountline a served mise file task carries. - spec
- Render a Usage KDL spec for a mise-mounted task named
bin. - spec_
bin - Parse
--usage-spec/--usage-spec=BINfrom argv (after the program name). - take
- If argv contains
--usage-spec[=BIN], print the spec forCand returnExitCode::SUCCESS.