summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsharkdp <davidpeter@web.de>2020-04-21 08:28:15 +0200
committerDavid Peter <sharkdp@users.noreply.github.com>2020-04-21 08:57:15 +0200
commita6d9d1551fb54ee2cb190a62a989defaf3461dcc (patch)
tree95d31452f6aece08f5006739ecd76c0c50217efb
parent34619a2e89b8f65d362a596b86337ca17409f13c (diff)
Improve error message
-rw-r--r--src/printer.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/printer.rs b/src/printer.rs
index ab64808d..e63d5877 100644
--- a/src/printer.rs
+++ b/src/printer.rs
@@ -237,7 +237,10 @@ impl<'a> Printer for InteractivePrinter<'a> {
InputFile::Ordinary(ofile) => {
format!("file '{}'", &ofile.provided_path().to_string_lossy())
}
- InputFile::StdIn(Some(name)) => name.to_string_lossy().into_owned(),
+ InputFile::StdIn(Some(name)) => format!(
+ "STDIN (with name '{}')",
+ name.to_string_lossy().into_owned()
+ ),
InputFile::StdIn(None) => "STDIN".to_owned(),
InputFile::ThemePreviewFile => "".to_owned(),
};