Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See
https://npm.community/t/why-does-the-cli-override-process-title/8400
tmux-plugins/tmux-resurrect#201
Code from http://broken-by.me/node-js-change-visible-process-name
Not a huge number of tmux resurrect users out there, but there are many reasons for setting the process title. For example, it would make it easier to identify an npm process inside
top
,htop
,ps
. We would simply like to give npm the ability to set the title.This just adds simple code to report the npm command being run in the process title.
I am expecting this to be closed because I suspect that the reason why the shell command that is being run is not shown in the title is done for security reasons (in case an npm command is constructed with passwords right in the command).
I think that even if this is grounds for rejection, we could at least have a discussion about whether we could add a flag to the CLI to allow the title to be manually specified or maybe a flag that can be configured to let it run this code?
Basically this will allow npm cli to report itself as
npm start
ornpm run lint
etc. rather than just alwaysnpm
.Thanks