-
-
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
Wrapping does not work when piping #758
Comments
This line checks and gives up on wrapping if the bat call is not interactive, but if we are providing an absolute width explicitly it should be fine...? Allowing this would be immensely helpful with fzf preview integration. |
Yes, I think so. Sounds like an easy fix 👍 |
Hi 😄 me and @allevo are trying to tackle this issue and we actually pulled out this preliminary PR. To solve the issue however it seems that we must extend the If yes how should we proceed with a new PR that address the actual |
Just a quick update, we managed to extend the Here's the separated PR. Let us know how we can proceed 😄 |
Maybe I was too fast with merging #785. Wrapping works just fine if we disable interactive mode by using # color and decorations:
bat --terminal-width 50 --wrap=character --color=always src/assets.rs | …
# color only
bat --terminal-width 50 --wrap=character --color=always --plain src/assets.rs | …
# no color
bat --terminal-width 50 --wrap=character --decorations=always src/assets.rs | …
# no color, no decorations
bat --terminal-width 50 --wrap=character --decorations=always --plain src/assets.rs | … |
No, it does not:
|
Ah, ok. So #785 was indeed necessary to fix this. It does work on
|
It looks like this can be closed. |
This has been fixed in bat 0.13. |
Line wrapping seems to be disabled when piping to another process, even when forced with
--wrap=character
.The text was updated successfully, but these errors were encountered: