ls condensed breakpoint env variable
PM2's table incorrectly renders on nearly all of my servers because of how much information it displays and my screen doesn't have the width for it.
- It attempts to render the full table even when the screen cannot support it; resulting in an overflow of various bars to the next line.
- I would prefer if we could explicitly hide columns from
pm2 ls, but a simple environment variable would suffice as a quick fix as condensed mode works great; just doesn't activate when I need it to.
My proposal is to add PM2_LS_CONDENSED_COLUMN_BREAKPOINT as an environment variable to specify what value is used to determine if condensed mode should be run (currently 120 is hardcoded). This would let admins define the variable globally for all users to ensure that anyone who runs pm2 ls will get the proper display mode.
- I think an overly specific name such as this would be good because it wouldn't conflict with anything else, and it would allow you to explicitly change the behavior of only this single component of PM2.
| Q | A |
|---|---|
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | |
| License | MIT |
| Doc PR | https://github.com/pm2-hive/pm2-hive.github.io/pulls |
process.stdout.columns = 120

process.stdout.columns = 119

This PR is just an environment variable to let one define their own breakpoint, rather than 120 (which is hardcoded)
Why not, weird that pm2 does not detect correct terminal width via process.stdout.columns
Would you mind making a PR on the PM2 doc
Thank you