1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-03 03:42:26 +01:00

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
2020-03-17 20:24:48 -06:00
committed by sharkdp
parent eb2f3ddb7c
commit 8adce9fae8
4 changed files with 21 additions and 2 deletions

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]