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
PAGER=batcat turns into a fork nightmare #2023
Comments
|
Thanks for reporting! There is code to prevent that from happening, but it does not take into account that the binary can be called something other than See Lines 105 to 106 in 9287cf6
I would be happy to review PRs that solves this |
|
My thought would be to modify PagerKind::from_bin to support other names. I have a couple of ideas:
For #2, I'm thinking to reuse Lines 43 to 46 in 9287cf6
|
|
My first choice would be 2., but the code to get the program name is something more like Or even better is |
|
I have a code fix but having not used GitHub I'm not sure if exactly how to send it to you. What I'm suggesting is this: |


I decided to make batcat my PAGER and when I tried setting:
it didn't work. After some troubleshooting I realized that batcat was forking/execing itself and was able to fix it by also adding:
while this solved the problem it was not obvious. One suggestion is when reading PAGER, if the value is the binary name (or ends with /{binary_name}) the value is ignored and the default is used instead.
The text was updated successfully, but these errors were encountered: