-
-
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
Can't use bat
at all! (Error: Use of bat as a pager is disallowed...)
#1413
Comments
That's intentional, see #1343 |
Hm. Kind of, but not to the extent documented here, actually. What we really want to avoid is infinite recursion ( What I didn't foresee is that users want to set So what we probably should do instead:
|
@cansurmeli Before the fix is out, as a workaround, you can pass I.e. this fails in 0.17.1: But this works: |
Another workaround would be to use |
@sharkdp Did you see my PR with |
Apparently `bat` isn't supposed to be set as a pager, even though it has paging capabilities. So they added a 'feature' that makes bat crash when it's set as a pager. I have no fucking clue why they'd do that. sharkdp/bat#1413
Apparently `bat` isn't supposed to be set as a pager, even though it has paging capabilities. So they added a 'feature' that makes bat crash when it's set as a pager. I have no fucking clue why they'd do that. sharkdp/bat#1413 Former-commit-id: d1b5392
I will happily fix this bug once #1402 is merged, because it should be very simple, assuming the current refactoring proposal in that PR survives code review. |
…r is disallowed...) Fixed by implementing the proposal by sharkdp: * Allow PAGER=bat, but ignore the setting in bat and simply default to less. Unless of course, BAT_PAGER or --pager is used to overwrite the value of PAGER. * Disallow the usage of bat within BAT_PAGER and --pager.
Apparently `bat` isn't supposed to be set as a pager, even though it has paging capabilities. So they added a 'feature' that makes bat crash when it's set as a pager. I have no fucking clue why they'd do that. sharkdp/bat#1413 Former-commit-id: d1b5392
Bugfix released in bat v0.18. |
Apparently `bat` isn't supposed to be set as a pager, even though it has paging capabilities. So they added a 'feature' that makes bat crash when it's set as a pager. I have no fucking clue why they'd do that. sharkdp/bat#1413 Former-commit-id: d1b5392
What version of
bat
are you using?bat 0.17.1
Describe the bug you encountered:
Whenever I use
bat
, I'm shown the following error message:I believe this started happening after a certain update but can't exactly pinpoint which one. I've uninstalled and reinstalled
bat
again but with no luck.What did you expect to happen instead?
For
bat
to display the contents as usual.How did you install
bat
?Homebrew
system
$ uname -srm
Darwin 20.1.0 x86_64
$ sw_vers
ProductName: macOS
ProductVersion: 11.0.1
BuildVersion: 20B29
bat
$ bat --version
bat 0.17.1
$ env
PAGER=bat
bat_config
bat_wrapper
No wrapper script for 'bat'.
bat_wrapper_function
No wrapper function for 'bat'.
No wrapper function for 'cat'.
tool
$ less --version
less 487 (POSIX regular expressions)
The text was updated successfully, but these errors were encountered: