feat(explain): allow specifying prompt arguments in explain and timings subcommands (#3042)
This commit is contained in:
parent
68694029c4
commit
8f82457c2d
31
src/main.rs
31
src/main.rs
|
@ -81,7 +81,8 @@ fn main() {
|
|||
.help("Print the main initialization script (as opposed to the init stub)");
|
||||
|
||||
let long_version = crate::shadow::clap_version();
|
||||
let mut app = App::new("starship")
|
||||
let mut app =
|
||||
App::new("starship")
|
||||
.about("The cross-shell prompt for astronauts. ☄🌌️")
|
||||
// pull the version number from Cargo.toml
|
||||
.version(shadow::PKG_VERSION)
|
||||
|
@ -173,20 +174,36 @@ fn main() {
|
|||
.required_unless("name"),
|
||||
),
|
||||
)
|
||||
.subcommand(
|
||||
SubCommand::with_name("bug-report").about(
|
||||
.subcommand(SubCommand::with_name("bug-report").about(
|
||||
"Create a pre-populated GitHub issue with information about your configuration",
|
||||
),
|
||||
)
|
||||
))
|
||||
.subcommand(
|
||||
SubCommand::with_name("time")
|
||||
.about("Prints time in milliseconds")
|
||||
.settings(&[AppSettings::Hidden]),
|
||||
)
|
||||
.subcommand(
|
||||
SubCommand::with_name("explain").about("Explains the currently showing modules"),
|
||||
SubCommand::with_name("explain")
|
||||
.about("Explains the currently showing modules")
|
||||
.arg(&status_code_arg)
|
||||
.arg(&pipestatus_arg)
|
||||
.arg(&path_arg)
|
||||
.arg(&logical_path_arg)
|
||||
.arg(&cmd_duration_arg)
|
||||
.arg(&keymap_arg)
|
||||
.arg(&jobs_arg),
|
||||
)
|
||||
.subcommand(
|
||||
SubCommand::with_name("timings")
|
||||
.about("Prints timings of all active modules")
|
||||
.arg(&status_code_arg)
|
||||
.arg(&pipestatus_arg)
|
||||
.arg(&path_arg)
|
||||
.arg(&logical_path_arg)
|
||||
.arg(&cmd_duration_arg)
|
||||
.arg(&keymap_arg)
|
||||
.arg(&jobs_arg),
|
||||
)
|
||||
.subcommand(SubCommand::with_name("timings").about("Prints timings of all active modules"))
|
||||
.subcommand(
|
||||
SubCommand::with_name("completions")
|
||||
.about("Generate starship shell completions for your shell to stdout")
|
||||
|
|
Loading…
Reference in New Issue