Module utils

Source
Expand description

Helpers for writing generators

Functions§

all_subcommands
Gets all subcommands including child subcommands in the form of ("name", "bin_name").
find_subcommand_with_path
Finds the subcommand clap::Command from the given clap::Command with the given path.
flags
Gets all the flags of a clap::Command. Includes help and version depending on the clap::Command settings.
longs_and_visible_aliases
Gets all the long options, their visible aliases and flags of a clap::Command. Includes help and version depending on the clap::Command settings.
possible_values
Get the possible values for completion
shorts_and_visible_aliases
Gets all the short options, their visible aliases and flags of a clap::Command. Includes h and V depending on the clap::Command settings.
subcommands
Gets subcommands of clap::Command in the form of ("name", "bin_name").