I end up in situations that I would like to copy&paste multiple lines from terminal running bat,
the problem is that with line numbers and frame (e.g. "|" pipe) decorations it's not optimal.
It would be great if I could easily with one button turn on/off all line numbers/decorations to make it easy for copy from terminal , and later come back to default viewing mode.
Unfortunately, that is not possible with less (see #1053).
However, you could take a look at this section: https://github.com/sharkdp/bat#xclip
Hmm, I came here to request this too. (I think #1053 is a different issue, although it could probably fix things too).
You can sort do this by adjusting the BAT_STYLE env var, however I'm not sure how to get the behavior of BAT_STYLE=auto but never including line numbers or anything else in the gutter (the gutter is what makes copy from terminal difficult).
Ideally I could do something like BAT_STYLE='auto,-numbers,-changes' but for now I've just set BAT_STYLE='header,grid' which seems to mostly do what I want (syntax highlighting and file header, but no gutter).
Ideally I could do something like
BAT_STYLE='auto,-numbers,-changes'
see #1032
Most helpful comment
Hmm, I came here to request this too. (I think #1053 is a different issue, although it could probably fix things too).
You can sort do this by adjusting the
BAT_STYLEenv var, however I'm not sure how to get the behavior ofBAT_STYLE=autobut never including line numbers or anything else in the gutter (the gutter is what makes copy from terminal difficult).Ideally I could do something like
BAT_STYLE='auto,-numbers,-changes'but for now I've just setBAT_STYLE='header,grid'which seems to mostly do what I want (syntax highlighting and file header, but no gutter).