Show compile time features in with command argument
Show compile time feature flags with compiled-with subcommand Closes #115
parent
bc08bf1d13
commit
ae8c2addab
|
@ -48,6 +48,8 @@ Print documentation page and exit (Piping to a pager is recommended.)
|
||||||
Print default theme keys and values in TOML syntax, to be used as a blueprint.
|
Print default theme keys and values in TOML syntax, to be used as a blueprint.
|
||||||
.It Cm print-loaded-themes
|
.It Cm print-loaded-themes
|
||||||
Print all loaded themes in TOML syntax.
|
Print all loaded themes in TOML syntax.
|
||||||
|
.It Cm compiled-with
|
||||||
|
Print compile time feature flags of this binary.
|
||||||
.It Cm view
|
.It Cm view
|
||||||
View mail from input file.
|
View mail from input file.
|
||||||
.El
|
.El
|
||||||
|
|
23
src/bin.rs
23
src/bin.rs
|
@ -180,6 +180,10 @@ enum SubCommand {
|
||||||
/// print documentation page and exit (Piping to a pager is recommended.).
|
/// print documentation page and exit (Piping to a pager is recommended.).
|
||||||
Man(ManOpt),
|
Man(ManOpt),
|
||||||
|
|
||||||
|
#[structopt(display_order = 4)]
|
||||||
|
/// print compile time feature flags of this binary
|
||||||
|
CompiledWith,
|
||||||
|
|
||||||
/// View mail from input file.
|
/// View mail from input file.
|
||||||
View {
|
View {
|
||||||
#[structopt(value_name = "INPUT", parse(from_os_str))]
|
#[structopt(value_name = "INPUT", parse(from_os_str))]
|
||||||
|
@ -290,6 +294,25 @@ fn run_app(opt: Opt) -> Result<()> {
|
||||||
Some(SubCommand::Man(_manopt)) => {
|
Some(SubCommand::Man(_manopt)) => {
|
||||||
return Err(MeliError::new("error: this version of meli was not build with embedded documentation. You might have it installed as manpages (eg `man meli`), otherwise check https://meli.delivery"));
|
return Err(MeliError::new("error: this version of meli was not build with embedded documentation. You might have it installed as manpages (eg `man meli`), otherwise check https://meli.delivery"));
|
||||||
}
|
}
|
||||||
|
Some(SubCommand::CompiledWith) => {
|
||||||
|
#[cfg(feature = "notmuch")]
|
||||||
|
println!("notmuch");
|
||||||
|
#[cfg(feature = "jmap")]
|
||||||
|
println!("jmap");
|
||||||
|
#[cfg(feature = "sqlite3")]
|
||||||
|
println!("sqlite3");
|
||||||
|
#[cfg(feature = "smtp")]
|
||||||
|
println!("smtp");
|
||||||
|
#[cfg(feature = "regexp")]
|
||||||
|
println!("regexp");
|
||||||
|
#[cfg(feature = "dbus-notifications")]
|
||||||
|
println!("dbus-notifications");
|
||||||
|
#[cfg(feature = "cli-docs")]
|
||||||
|
println!("cli-docs");
|
||||||
|
#[cfg(feature = "gpgme")]
|
||||||
|
println!("gpgme");
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
Some(SubCommand::PrintLoadedThemes) => {
|
Some(SubCommand::PrintLoadedThemes) => {
|
||||||
let s = conf::FileSettings::new()?;
|
let s = conf::FileSettings::new()?;
|
||||||
print!("{}", s.terminal.themes.to_string());
|
print!("{}", s.terminal.themes.to_string());
|
||||||
|
|
Loading…
Reference in New Issue