I really like its theme which changes according to the language.
I use -p whenever I've to copy the content.
But I couldn't find an option to clear the content when quit or q.
You can take reference of less without any argument.
Please let me know in case of any confusion.
If I understand correctly, you want the screen to be cleared after you're done viewing the paged file and you press q?
If you use the latest version of less (less 551), that should work by default. If you don't, you can add this to the file listed by bat --config-file:
--pager='less -R`
That should make it clear the screen after you quit, but you will lose the --quit-if-one-screen behavior.
I had bat 0.12.1 and had no bat --config-file available.
I upgraded the package to bat 0.15.4, according to #573 and worked like a pro.
Thanks.
But at any time, I want bat to give results as normal.
I did cat --pager="less" .zshrc but nothing happened.
I finally figured that the default pager is less i.e. "--pager="less -R" on 0.15.4
Most helpful comment
If I understand correctly, you want the screen to be cleared after you're done viewing the paged file and you press
q?If you use the latest version of less (less 551), that should work by default. If you don't, you can add this to the file listed by
bat --config-file:That should make it clear the screen after you quit, but you will lose the
--quit-if-one-screenbehavior.