bat: edit page (#12451)

* bat: edit page

* bat: add both short and long options

* Update pages/common/bat.md

Co-authored-by: Juri Dispan <juri.dispan@posteo.net>

* Update pages/common/bat.md

Co-authored-by: Juri Dispan <juri.dispan@posteo.net>

* Update pages/common/bat.md

Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>

* Update pages/common/bat.md

Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>

* Update pages/common/bat.md

Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>

* Update pages/common/bat.md

Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>

---------

Co-authored-by: Juri Dispan <juri.dispan@posteo.net>
Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
pull/23/head
Fazle Arefin 2024-03-06 12:34:16 +11:00 committed by GitHub
parent 8eaccf30f9
commit c639284e97
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 16 additions and 8 deletions

View File

@ -4,7 +4,7 @@
> A `cat` clone with syntax highlighting and Git integration.
> More information: <https://github.com/sharkdp/bat>.
- Print the contents of one or more files to `stdout`:
- Pretty print the contents of one or more files to `stdout`:
`bat {{path/to/file1 path/to/file2 ...}}`
@ -12,18 +12,26 @@
`bat {{path/to/file1 path/to/file2 ...}} > {{path/to/target_file}}`
- Append several files into the target file:
- Remove decorations and disable paging (`--style plain` can be replaced with `-p`, or both options with `-pp`):
`bat {{path/to/file1 path/to/file2 ...}} >> {{path/to/target_file}}`
`bat --style plain --pager never {{path/to/file}}`
- Number all output lines:
- Highlight a specific line or a range of lines with a different background color:
`bat --number {{path/to/file}}`
`bat {{--highlight-line|-H}} {{10|5:10|:10|10:|10:+5}} {{path/to/file}}`
- Syntax highlight a JSON file:
- Show non-printable characters like space, tab or newline:
`bat --language json {{path/to/file.json}}`
`bat {{--show-all|-A}} {{path/to/file}}`
- Remove all decorations except line numbers in the output:
`bat {{--number|-n}} {{path/to/file}}`
- Syntax highlight a JSON file by explicitly setting the language:
`bat {{--language|-l}} json {{path/to/file.json}}`
- Display all supported languages:
`bat --list-languages`
`bat {{--list-languages|-L}}`