-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Problem with line wrapping for bat #2515
Comments
That could already be your problem. That method tries to use winapi calls to get the size of a conhost window, but it's running in a unix TTY. Unless you linked the wrong file and it's actually using unix_term.rs to determine it's size, I'd expect that to fail. You'd probably need to compile your own MSys2 bat to get this to work in MinTTY. If you don't care about MinTTY you could alternatively reinstall Git for Windows with the windows console option. |
mintty/mintty#482 confirms my expectations: GetConsoleScreenBufferInfo doesn't work in MinTTY. isatty/ioctl would work when compiled as an MSys2 application. |
And looking at rust-lang/rust, there doesn't seem to be a way to build rust for MSys2, so building bat for MSys2 is probably an unreasonable endeavour. That reduces your sane options to
Edit: does |
Yes |
I created an issue #824 and they recommended that I push the issue upstream.
Setup
defaults?
to the issue you're seeing?
I'm trying to use bat to view stdout and files from the termainal.
Details
Bash
Minimal, Complete, and Verifiable example
this will help us understand the issue.
I expected that when bat attempted to assess the terminal width using:
https://github.com/mitsuhiko/console/blob/a999e34bbbf66886aa7420dc6e2d7cc264ade959/src/windows_term.rs#L77-L87
the bash terminal would return the correct width.
bat wraps all lines at 80 characters, instead of at the width of the terminal
The text was updated successfully, but these errors were encountered: