bat

Posted on:

bat is a feature-rich alternative to cat that can be used as a pager. However, bat itself is not a pager; it calls a pager internally. By default, bat uses less, but you can use ov as the pager. You can use it by setting the environment variable PAGER or BAT_PAGER.

export BAT_PAGER="ov -F -H3"

Ensure that bat does not wrap lines (--wrap=never). If bat wraps lines, it cannot be unwrapped later. It is recommended to use ov for better operation.

bat --wrap=never README.md

bat bat