-
-
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
Since recent update, short files that do not require paging are displayed and then lost #887
Comments
Thank you for reporting this. That looks like yet another problem with Could you please tell us which version of less you are running?
As a workaround, you can disable paging by adding
to your |
The behavior that is new since the last release is the following: #786 |
partly related: #860 |
@glucas Any update on this? I'd really like to fix this if this is a bug. |
I've looked into this myself. I can reproduce this on Windows with less 551. The problem is the following: We used to call less --RAW-CONTROL-CHARS --quit-if-one-screen --no-init We only passed Since bat 0.13, we omit the If I call less --RAW-CONTROL-CHARS --quit-if-one-screen small-file on a small file, I don't see any output (only a small flash, as described above). On Linux, everything works fine. Maybe @gwsw could have a look? (only if you find the time!) |
Hi @sharkdp, I am running bat 0.13.0 on MacOS Catalina and I am having similar issues as to what is reported here. Small files not needing the pager will not show up (although the screen flickers like it's going to show the contents, but just returns back out to a prompt. If I use the $ bat --version
bat 0.13.0
$ less --version
less 487 (POSIX regular expressions)
Copyright (C) 1984-2016 Mark Nudelman
less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Homepage: http://www.greenwoodsoftware.com/less If this should be a new issue let me know but since they seemed similar enough I thought I would start here. |
@dugdun Thank you for reporting this. It would be great if you could open a new bug report using the corresponding issue template: https://github.com/sharkdp/bat/issues/new?assignees=&labels=bug&template=bug_report.md&title= |
@sharkdp I've filed a new bug report. Sorry for cluttering this issue. Thanks for the awesome tool! |
Could you try less v558 at https://github.com/gwsw/less and verify whether that fixes the problem for you? |
@gwsw Thank you very much for this update! I tried building v558 from source in my VirtualBox Windows setup, but gave up after an hour or so. I'm not really familiar with the Windows Visual C++ world. If anyone could build a amd64 binary for me, I'm happy to try this out. If this fixes the bug on Windows, we can change Some(version) if (version < 530 || (cfg!(windows) && version < 558)) => {
p.arg("--no-init");
} |
I found a problem with less v558 and have updated it. Please used v559 for your testing. |
@gwsw Thank you very much for your support. I'm going to assume that the bug is fixed in 559, so I updated the logic accordingly: 864656b If someone is able to test this, any support would be greatly appreciated. In the meantime, I'm going to close this ticket. The issue will definitely be solved for less 551. |
We used to call `less` with ``` bash less --RAW-CONTROL-CHARS --quit-if-one-screen --no-init ``` We only passed `--no-init` because there was a bug with previous versions of `less` which required the use of `--no-init` in combination with `--quit-if-one-screen` to prevent this "no output" issue from happening. Since bat 0.13, [we omit the `--no-init` option](https://github.com/sharkdp/bat/blob/0ecc94956b88beed27ca13a130c8ba09f1a220d8/src/output.rs#L85-L97) if we can detect that the version of `less` is higher than or equal to 530. We did that because `--no-init` breaks mouse support and because [less 530 fixed the above-mentioned bug](http://www.greenwoodsoftware.com/less/news.530.html). However, it seems that this bug was *not* fixed on Windows! According to @gwsw, the issue should be fixed with less 559 on Windows. closes sharkdp#887
This has been fixed in bat v0.14. |
I'm using bat on Windows 10, installed via scoop. After updating yesterday to the latest release, I'm seeing a change in behavior. When I bat a small file (that does not require paging), it looks like the terminal is cleared, the output is shown, and then things reset and I've lost the output.
With a longer file I get the normal paging behavior and things seem fine.
Things were working as expected prior to this latest release.
The text was updated successfully, but these errors were encountered: