summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorJon Grythe Stødle <jonstodle@outlook.com>2020-01-02 05:19:08 +0100
committerMatan Kushner <hello@matchai.me>2020-01-01 23:19:08 -0500
commit8e5fa60fc8dbea2274284b120fdb454bbfea2fc9 (patch)
tree6dc0df93bbb1b99a9d682c222b4e99749044c3a0 /src/main.rs
parent6bafe4cd66ef89b309da4c6b280a56c41a56e74e (diff)
feat: Add the `starship explain` command (#699)
This adds the explain argument to Starship, which explains what the printed modules in the prompt are.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 9fb1e0fee..9b917a34b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -122,6 +122,9 @@ fn main() {
.about("Prints time in milliseconds")
.settings(&[AppSettings::Hidden]),
)
+ .subcommand(
+ SubCommand::with_name("explain").about("Explains the currently showing modules"),
+ )
.get_matches();
match matches.subcommand() {
@@ -157,6 +160,7 @@ fn main() {
None => println!("{}", -1),
}
}
+ ("explain", Some(sub_m)) => print::explain(sub_m.clone()),
_ => {}
}
}