-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bat -p should also default --wrap never #289
Comments
AFAIK, you can't configure it by altering the theme. However, I agree that |
@wakemaster39 Thank you for the feedback! Absolutely agreed, wrapping should be disabled for the |
Released in v0.7.0. |
Hi, I've just upgraded to v0.7.0 and it doesn't seem to disable wrapping when invoked with |
Thanks! |
Fixed in v0.7.1 |
Hi, all. I'm using ranger, specifying Within the ranger preview pane, Because of the outcome of this issue ( What I've resorted to is I've made a screenshot to hopefully better illustrate everything I'm talking about above (large, so I'm not embedding it here). Is there some other trick I'm missing to get If the answer is "that's beyond the scope" or "it's not |
@ernstki Good catch on it not being possible to wrap when A solution would be to keep wrapping enabled if - output_wrap: if !self.interactive_output {
+ output_wrap: if !self.interactive_output && !self.matches.is_present("terminal-width") { You are correct about bat not having word wrapping. I was the one who added the wrapping feature, and I wasn't able to come up with a decent solution for how to do word wrapping at the time. The styles parsed by syntect weren't suitable as word boundaries, and I didn't want to implement word breaking that failed to take the language into consideration. |
OK, I understand that being more of a challenge with the embedded formatting from syntax highlighting. I'm apprehensive about just implementing your suggestion in a new pull request, because
I think if no one else is asking for this, maybe it's best if I just keep a patchfile around on my end. |
It's definitely not a bug, but it is an outdated behaviour that could be improved upon fairly easily. I also wouldn't consider it to be feature creep. The I do agree that the option would be better named as |
When using cat on files containing long string like in
id_rsa.pub
, you are able to easily highlight and select the text and paste it anywhere and its copied verbatim. Using bat, since the default is to wrap output internally and not have the terminal do it, this causes additional line breaks in the copied text. This is extremely misleading when you are doing things like transferring text and using terminals of the same width so you do not see the added line breaks.Adding the
--wrap never
along with-p
is cumbersome and leads to falling back on cat instead.Is this option configurable if I was to alter the theme?
The text was updated successfully, but these errors were encountered: