Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
mlevental
· 8y ago · 0 comments
bat is cool but is there a way to get not to dump everything into my terminal and just page just like less? i wonder if there's a `bless` ?
Comments
[–]
busterc
8y ago
I know what you're saying; I wanted the same thing. Here's how I resolved it:
https://gist.github.com/busterc/f8e988b4ca63f24c71c56daf448a...
[–]
jayrhynas
8y ago
You should be able to pass `--paging always`. The default `auto` will only page if the file contents is bigger than your screen.
[–]
mlevental
OP
8y ago
this does paging but still leaves the page in my buffer/terminal/whatever.
[–]
C0d3r
8y ago
If your terminal is big enough, it will just output like cat, otherwise, you get a pager.
You can disable it with `bat --paging never`
[–]
craftyguy
8y ago
By default, bat seems to support displaying contents of the file in a pager.