summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 977f99414..514097a7a 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -132,6 +132,17 @@ fn main() {
.arg(Arg::with_name("value").help("Value to place into that key")),
)
.subcommand(
+ SubCommand::with_name("print-config")
+ .about("Prints the computed starship configuration")
+ .arg(
+ Arg::with_name("default")
+ .short("d")
+ .long("default")
+ .help("Print the default instead of the computed config")
+ .takes_value(false),
+ ),
+ )
+ .subcommand(
SubCommand::with_name("toggle")
.about("Toggle a given starship module")
.arg(
@@ -208,6 +219,10 @@ fn main() {
configure::edit_configuration()
}
}
+ ("print-config", Some(sub_m)) => {
+ let print_default = sub_m.is_present("default");
+ configure::print_configuration(print_default)
+ }
("toggle", Some(sub_m)) => {
if let Some(name) = sub_m.value_of("name") {
if let Some(value) = sub_m.value_of("key") {