mirror of
https://github.com/Llewellynvdm/starship.git
synced 2025-04-08 10:01:51 +00:00
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)");
|
.help("Print the main initialization script (as opposed to the init stub)");
|
||||||
|
|
||||||
let long_version = crate::shadow::clap_version();
|
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. ☄🌌️")
|
.about("The cross-shell prompt for astronauts. ☄🌌️")
|
||||||
// pull the version number from Cargo.toml
|
// pull the version number from Cargo.toml
|
||||||
.version(shadow::PKG_VERSION)
|
.version(shadow::PKG_VERSION)
|
||||||
@ -173,20 +174,36 @@ fn main() {
|
|||||||
.required_unless("name"),
|
.required_unless("name"),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.subcommand(
|
.subcommand(SubCommand::with_name("bug-report").about(
|
||||||
SubCommand::with_name("bug-report").about(
|
|
||||||
"Create a pre-populated GitHub issue with information about your configuration",
|
"Create a pre-populated GitHub issue with information about your configuration",
|
||||||
),
|
))
|
||||||
)
|
|
||||||
.subcommand(
|
.subcommand(
|
||||||
SubCommand::with_name("time")
|
SubCommand::with_name("time")
|
||||||
.about("Prints time in milliseconds")
|
.about("Prints time in milliseconds")
|
||||||
.settings(&[AppSettings::Hidden]),
|
.settings(&[AppSettings::Hidden]),
|
||||||
)
|
)
|
||||||
.subcommand(
|
.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(
|
||||||
SubCommand::with_name("completions")
|
SubCommand::with_name("completions")
|
||||||
.about("Generate starship shell completions for your shell to stdout")
|
.about("Generate starship shell completions for your shell to stdout")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user