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 withmount_line. - mount_
line - The
#USAGE mountline a mise file task carries for the task namedtask. - spec
- Render the Usage KDL spec of
commandas a mise task namedbin. - spec_
bin - Read
--usage-specor--usage-spec=BINfromargs, which exclude the program name. - take
- If the process argv asks for
--usage-spec[=BIN], print the spec ofCto stdout and return the exit code to end with.