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

FR: Have pxtree pxtree work. #127

Open
ilyagr opened this issue Jun 8, 2024 · 2 comments
Open

FR: Have pxtree pxtree work. #127

ilyagr opened this issue Jun 8, 2024 · 2 comments

Comments

@ilyagr
Copy link

ilyagr commented Jun 8, 2024

I occasionally want to know the PID of the shell I'm in or of the terminal I'm in. The natural thing to do is pxtree pxtree, but that cleverly filters out itself and shows nothing.

I wish it worked. I am not sure whether the best solution would be to except pxtree pxtree, or to simply disable the self-filtering behavior for pxtree. I suppose there could also be a pxtree --self option.

ptop might also benefit from being able to show its own tree. Perhaps it would be good to disable self-filtering in tree mode.

@ilyagr ilyagr changed the title Have pxtree pxtree work. FR: Have pxtree pxtree work. Jun 8, 2024
@walles
Copy link
Owner

walles commented Jun 9, 2024

A number of shells provide the shell PID using echo $PPID. In fish you can echo $fish_pid.

So you could do pxtree $PPID or pxtree $fish_pid to get this info. Not super discoverable though.

What's your usecase? What do you intend to use the shell's / terminal's PID for?

I'm not necessarily against this, but I do want to understand what the root problem is first!

@ilyagr
Copy link
Author

ilyagr commented Jun 9, 2024 via email

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

2 participants