Implement --file-name<name> option

- can specify filename to be displayed when printing.
- useful for when piping data from STDIN

Closes #654
This commit is contained in:
Kyle Criddle authored and sharkdp committed 2020-03-22 11:10:27 +01:00
1 parent eb2f3ddb7c
commit 8adce9fae8
4 files changed
+21 -2

No files matched your search

+3
View File
@@ -70,6 +70,9 @@ pub struct Config<'a> {
/// Ranges of lines which should be highlighted with a special background color
pub highlighted_lines: HighlightedLineRanges,
/// Name of file to display when printing
pub filename: Option<&'a str>,
}
#[test]