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

Add note regarding using cmd and name properties #46

Merged
merged 3 commits into from Oct 12, 2020
Merged

Add note regarding using cmd and name properties #46

merged 3 commits into from Oct 12, 2020

Conversation

stroncium
Copy link
Contributor

@stroncium stroncium commented Oct 6, 2020

#30 provided the code, this just adds a hint to readme about that.

I think it's the maximum we can do about #1 without drastically changing API as it is a bit more complicated than just "process name" on Linux and OS X. There are command line, executable name, process name all different things that can change separately to some extent. Depending on how much the user knows about that and what are his purposes he might want to see each one of them as name. However as ps-list is mostly designed for relatively simple use cases, I think providing original name as it is and hinting that one might extract something that is most similar to windows name from cmd is the way as it both gives the user simple enough solution to the problem and doesn't restrict him nor introduce incorrect abstractions.

Furthermore, it seems to be the limit of what we can do without introducing really complex dependencies. /proc is easy but only works under linux, ps implementations are different on different systems plus I didn't see a single one which provides more info than we already have.


IssueHunt Summary

Referenced issues

This pull request has been submitted to:


@sindresorhus sindresorhus merged commit 2bd4bbd into sindresorhus:master Oct 12, 2020
@sindresorhus sindresorhus mentioned this pull request Oct 12, 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

Successfully merging this pull request may close these issues.

None yet

2 participants