Separate inputs from config

This commit is contained in:
sharkdp authored and David Peter committed 2020-04-22 23:55:28 +02:00
1 parent 5e5cb89da6
commit 1dc328ad49
10 files changed
+61 -41

No files matched your search

+8
View File
@@ -243,6 +243,10 @@ impl<'a> Printer for InteractivePrinter<'a> {
),
InputFile::StdIn(None) => "STDIN".to_owned(),
InputFile::ThemePreviewFile => "".to_owned(),
InputFile::FromReader(_, Some(name)) => {
format!("file '{}'", name.to_string_lossy())
}
InputFile::FromReader(_, None) => "READER".to_owned(),
};
writeln!(
@@ -286,6 +290,10 @@ impl<'a> Printer for InteractivePrinter<'a> {
}
InputFile::StdIn(None) => ("File: ", Cow::from("STDIN".to_owned())),
InputFile::ThemePreviewFile => ("", Cow::from("")),
InputFile::FromReader(_, Some(name)) => {
("File: ", Cow::from(name.to_string_lossy().to_owned()))
}
InputFile::FromReader(_, None) => ("File: ", Cow::from("READER".to_owned())),
};
let mode = match self.content_type {