From d1e19407e9faec62c0635ac7330f2c437b15ba20 Mon Sep 17 00:00:00 2001 From: Muhammad Falak R Wani Date: Wed, 5 Sep 2018 11:05:06 +0530 Subject: [PATCH 1/2] bat: add page (#2296) --- pages/common/bat.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 pages/common/bat.md diff --git a/pages/common/bat.md b/pages/common/bat.md new file mode 100644 index 00000000000000..94a09e600ad56b --- /dev/null +++ b/pages/common/bat.md @@ -0,0 +1,23 @@ +# bat + +> Print and concatenate files. A cat(1) clone with syntax highlighting and Git integration. + +- Print the contents of a file to the standard output: + +`bat {{file}}` + +- Concatenate several files into the target file: + +`bat {{file1}} {{file2}} > {{target_file}}` + +- Append several files into the target file: + +`bat {{file1}} {{file2}} >> {{target_file}}` + +- Number all output lines: + +`bat -n {{file}}` + +- Syntax highlight a json file: + +`bat --language json {{file.json}}` From 6a3ca36d30f1104e56447db5e5cef09139c548ed Mon Sep 17 00:00:00 2001 From: Muhammad Falak R Wani Date: Wed, 5 Sep 2018 19:08:09 +0530 Subject: [PATCH 2/2] bat: add option for displaying supported languages. --- pages/common/bat.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pages/common/bat.md b/pages/common/bat.md index 94a09e600ad56b..9e65c5c333cc0a 100644 --- a/pages/common/bat.md +++ b/pages/common/bat.md @@ -1,6 +1,7 @@ # bat -> Print and concatenate files. A cat(1) clone with syntax highlighting and Git integration. +> Print and concatenate files. +> A `cat` clone with syntax highlighting and Git integration. - Print the contents of a file to the standard output: @@ -21,3 +22,7 @@ - Syntax highlight a json file: `bat --language json {{file.json}}` + +- Display all supported languages: + +`bat --list-language`