bat icon indicating copy to clipboard operation
bat copied to clipboard

How do I display the filename in the footer

Open th4s opened this issue 3 years ago • 2 comments

What I want is the behavior from less -M, but when I set export BAT_PAGER="less -RFM" in my .bashrc, bat somehow ignores the filename. This would be super handy if you compare many files in different windows, that you can see the filename for every file in the footer.

th4s avatar Sep 16 '21 18:09 th4s

Unfortunately, less isn't aware of the file that bat is reading. It would be possible to manually add the file name to the less prompt, though:

less -M -PM'some_file\.txt %lt-%lb' some_file.txt

eth-p avatar Oct 02 '21 21:10 eth-p

Just checking in that this is still not possible, because I would love it too. For long files, it is a pain to have to move back up to the header to see the filename. Ideally would be a shortcut like = in less which toggles the desired data to be displayed in the footer.

cohml avatar Sep 08 '22 17:09 cohml