just/src/configuration.rs

30 lines
633 B
Rust
Raw Normal View History

use crate::common::*;
2017-11-16 23:30:08 -08:00
2017-11-17 17:28:06 -08:00
pub const DEFAULT_SHELL: &str = "sh";
2017-11-16 23:30:08 -08:00
pub struct Configuration<'a> {
pub dry_run: bool,
pub evaluate: bool,
2017-11-16 23:30:08 -08:00
pub highlight: bool,
pub overrides: BTreeMap<&'a str, &'a str>,
pub quiet: bool,
pub shell: &'a str,
pub color: Color,
pub verbosity: Verbosity,
2017-11-16 23:30:08 -08:00
}
impl<'a> Default for Configuration<'a> {
fn default() -> Configuration<'static> {
Configuration {
dry_run: false,
evaluate: false,
2017-11-16 23:30:08 -08:00
highlight: false,
overrides: empty(),
quiet: false,
shell: DEFAULT_SHELL,
color: default(),
verbosity: Verbosity::from_flag_occurrences(0),
2017-11-16 23:30:08 -08:00
}
}
}