This commit is contained in:
Nisheet Sinvhal 2018-11-02 16:36:49 +05:30 committed by David Peter
parent 1ece38a4c4
commit 44bdae0212
3 changed files with 4 additions and 4 deletions

View File

@ -77,7 +77,7 @@ pub struct Config<'a> {
/// Command to start the pager
pub pager: Option<&'a str>,
pub italics: bool
pub italics: bool,
}
fn is_truecolor_terminal() -> bool {
@ -262,7 +262,7 @@ impl App {
pager: self.matches.value_of("pager"),
italics: match self.matches.value_of("italic-text") {
Some("always") => true,
_ => false
_ => false,
},
})
}

View File

@ -329,7 +329,7 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
.possible_values(&["always", "never"])
.default_value("never")
.hide_default_value(true)
.help("Use italics in output (always, *never*)")
.help("Use italics in output (always, *never*)"),
)
.subcommand(
SubCommand::with_name("cache")

View File

@ -306,7 +306,7 @@ impl<'a> Printer for InteractivePrinter<'a> {
let true_color = self.config.true_color;
let colored_output = self.config.colored_output;
let italics = self.config.italics;
for &(style, region) in regions.iter() {
let text = &*self.preprocess(region, &mut cursor_total);
write!(