1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-24 21:57:41 +00:00

feat(explain): allow specifying prompt arguments in explain and timings subcommands (#3042)

This commit is contained in:
David Knaack 2021-10-03 16:08:18 +02:00 committed by GitHub
parent 68694029c4
commit 8f82457c2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")