feat: allow printing config file schema (#3737)

This commit is contained in:
David Knaack
2022-04-01 17:14:05 +02:00
committed by GitHub
parent 418bac9190
commit 18ad26f98d
85 changed files with 4944 additions and 0 deletions
+5
View File
@@ -97,6 +97,9 @@ enum Commands {
#[clap(default_value = "disabled")]
value: String,
},
#[cfg(feature = "config-schema")]
/// Generate a schema for the starship configuration as JSON-schema
ConfigSchema,
}
fn main() {
@@ -216,6 +219,8 @@ fn main() {
.map(char::from)
.collect::<String>()
),
#[cfg(feature = "config-schema")]
Commands::ConfigSchema => print::print_schema(),
}
}