One of the main uses of cat for me was to print output of files, so that I can copy paste easily. Is such a feature supported in bat?
If no, why not develop it :smile:
It actually is supported! :)
If you want bat to just print out the file contents without the sidebar and pager, you can use -p --wrap=never --paging=never to have it only output the syntax-highlighted text. In the next release, you won't even need to use --wrap (#291).
If you're looking to copy text off of a local terminal (not SSH), there's an even easier way that you might find useful:
macOS:
bat file | pbcopy
Linux:
bat file | xclip
it would be better I close this issue now
Most helpful comment
It actually is supported! :)
If you want bat to just print out the file contents without the sidebar and pager, you can use
-p --wrap=never --paging=neverto have it only output the syntax-highlighted text. In the next release, you won't even need to use--wrap(#291).If you're looking to copy text off of a local terminal (not SSH), there's an even easier way that you might find useful:
macOS:
Linux: