mirror of
https://github.com/sharkdp/bat.git
synced 2024-11-22 15:53:29 +01:00
explain how to use bat as cat (no paging)
This commit is contained in:
parent
2b82203041
commit
ba5cbe208f
12
README.md
12
README.md
@ -38,14 +38,14 @@ characters:
|
|||||||
|
|
||||||
### Automatic paging
|
### Automatic paging
|
||||||
|
|
||||||
`bat` can pipe its own output to a pager (e.g `less`) if the output is too large for one screen.
|
By default, `bat` pipes its own output to a pager (e.g `less`) if the output is too large for one screen.
|
||||||
|
If you would rather `bat` work like `cat` all the time (never page output), you can set `--paging=never` as an option, either on the command line or in your configuration file.
|
||||||
|
If you intend to alias `cat` to `bat` in your shell configuration, you can use `alias cat='bat --paging=never'` to preserve the default behavior.
|
||||||
|
|
||||||
### File concatenation
|
#### File concatenation
|
||||||
|
|
||||||
Oh.. you can also use it to concatenate files :wink:. Whenever
|
Even with a pager set, you can still use `bat` to concatenate files :wink:.
|
||||||
`bat` detects a non-interactive terminal (i.e. when you pipe into another process
|
Whenever `bat` detects a non-interactive terminal (i.e. when you pipe into another process or into a file), `bat` will act as a drop-in replacement for `cat` and fall back to printing the plain file contents, regardless of the `--pager` option's value.
|
||||||
or into a file), `bat` will act as a drop-in replacement for `cat` and
|
|
||||||
fall back to printing the plain file contents.
|
|
||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user