Skip to content
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

procs display issue #92

Closed
zlscherr opened this issue Nov 24, 2020 · 12 comments
Closed

procs display issue #92

zlscherr opened this issue Nov 24, 2020 · 12 comments
Assignees

Comments

@zlscherr
Copy link

When running procs on my Mac Catalina, the display seems to be separated by many lines

Screen Shot 2020-11-24 at 3 03 56 PM

Any idea what's going on? If I do

procs | cat

then the spacing appears to be normal. Also, if I just run procs --watch then the spacing is also fine

Screen Shot 2020-11-24 at 3 08 53 PM

Thanks,
Zach

@dalance dalance self-assigned this Nov 24, 2020
@dalance
Copy link
Owner

dalance commented Nov 24, 2020

Thank you for your report.
It seems to be pager problem.

Could you try the following commands?

$ procs --pager disable
$ procs --color always | less -SR

@zlscherr
Copy link
Author

Both of those commands display successfully. As a temporary workaround I will just alias procs to one of those options.

I'm not sure what's happening with the pager, I unset PAGER and LESS but with just running procs the problem persists. Thank you again for your help.

@dalance
Copy link
Owner

dalance commented Nov 25, 2020

Maybe, can procs --color always | more -f reproduce the issue?
If so, less detection is failed.

Could you try to put the following file?

$ cat ~/.config/procs/config.toml
[pager]
command = "less -SR"

@roblav96
Copy link

Screen Shot 2020-11-24 at 9 31 45 PM

Same issue here.

@zlscherr
Copy link
Author

zlscherr commented Nov 25, 2020

I did some git bisecting and it seems this problem started in 072e7b0. The problem seems to be in src/view.rs in the lines:

Pager::with_pager("less -SR") .pager_envs(&["LESSCHARSET=utf-8"]) .setup();

I tried removing the .pager_envs(&["LESSCHARSET=utf-8"]) line and it worked correctly. I don't really know anything about pagers, but somehow this line is leading to problems.

@zlscherr
Copy link
Author

And also it's not specifically the LESSCHARSET=utf-8 that causes problems. If I change the line to something like

pager_envs(&["X=3"])

then the display is still weird. Maybe it's a problem with the pager crate?

@dalance
Copy link
Owner

dalance commented Nov 25, 2020

Thank you for a lot of information.
I'll disable it on macOS because it is a workaround for Ubuntu.

dalance added a commit that referenced this issue Nov 25, 2020
@zlscherr
Copy link
Author

You're welcome. I also fooled around a bit, and if I change the line to

Pager::with_pager("/usr/bin/less -SR") .pager_envs(&["LESSCHARSET=utf-8"]) .setup();

then it seems to work fine. I don't know enough rust to know what's going on, but I'm happy to test anything on Mac.

@roblav96
Copy link

@zlscherr
In that screenshot, my procs.toml has pager set to never and zsh env var PAGER=cat

@dalance
Copy link
Owner

dalance commented Nov 25, 2020

Could you try b90b4cc?
If it works fine, I'll release it as v0.10.10.

@zlscherr
Copy link
Author

That fixes the issue for me. Thank you so much, and thank you for designing such a useful tool!

@dalance
Copy link
Owner

dalance commented Nov 26, 2020

Thanks. I released v0.10.10.

@dalance dalance closed this as completed Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants