-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Error messages from less in version 1.3.2 #207
Comments
Same issues seen on FreeBSD 14.1-RELEASE with rust 1.77, Using |
This is a bug in pager-0.16.1 The function There is a merge request pending since last year to correct this. https://gitlab.com/imp/pager-rs/-/merge_requests/8 At this moment the use of |
Hi @praxanz, apologize for the delayed response as I've been swamped with work lately. And thank you for your efforts in investigating this issue. Also thanks @rvstaveren for the feedback. I think the first workaround is better, since it prevents the pager's behavior from being affected by existing environment variables. @praxanz Would you be willing to submit a pull request? Or I implement it as you suggested. |
I am still trying to learn how to work with git and I don't know yet how to submit a pull request. |
@praxanz Got it. I will fix it soon. Would you mind telling me your email so I can add you as a co-author? Although this commit may seem like a one-line change, your contribution should be noted. |
No need to add me as a co-author for this two character temporary fix that will be removed as soon as the upstream bug is corrected. My only contribution was discovering this bug and doing some diagnostic work. Small remark: In the comment in your pull request you mention merge request #8 in the upstream code base, but there is also a different merge request #10 that tries to solve the same problem. |
With the environment variable
PAGER
unset, runningcsview
with a filename, results inless
showing the error message:when using standard input, the error is:
Running these commands with
ltrace
shows that when the stringLESS=-SF
is passed to the functionputenv()
, the trailing null character is missing and extra garbage characters are added to the environment variable:putenv("LESS=-SF\350\331\002\354p")
orputenv("LESS=-SFless")
Not being a rust programmer, I don't know the best way to correct this, but as a workaround, either one of the quick and dirty patches below fixes the issue for me.
In
main.rs
replace the linewith either
or else with
testing environment
The text was updated successfully, but these errors were encountered: