Skip to main content

Module usage

Module usage 

Source
Available on crate feature usage only.
Expand description

Mise Usage spec from a clap Command.

A CLI answers --usage-spec[=BIN] before Clap parses, so it declares no such flag. A mise file task that runs the CLI carries mount_directives, which end with mount_line: a #USAGE mount line, from which mise asks the CLI for its spec. A user then runs mise run toy status with no --. The -- in the mount line is only how mise fetches the spec, as mise documents.

App::mounted_as answers the request for an App, and take does the same for a binary without one.

Functionsยง

mount_directives
The mise directives a file task that runs a CLI carries for the task named task, ending with mount_line.
mount_line
The #USAGE mount line a mise file task carries for the task named task.
spec
Render the Usage KDL spec of command as a mise task named bin.
spec_bin
Read --usage-spec or --usage-spec=BIN from args, which exclude the program name.
take
If the process argv asks for --usage-spec[=BIN], print the spec of C to stdout and return the exit code to end with.