That said, I would probably write my own portable tool if it came to
that, as my gripes with |ps| are not to everyone's tastes.
*
It is the 21st century. The FreeBSD, OpenBSD, and NetBSD |ps|
programs all use |-| as the command-line option introducer, and have
done since /at least/ BSD 4.4 Lite in 1994
<
https://github.com/freebsd/freebsd/blob/e3cfc8ce61f788739c66445d903f8beacb40c93d/bin/ps/ps.c#L133>.
A "BSD personality" that gives me the interface from the 1980s is
not /actually/ a BSD personality that gives me |ps| as it exists and
as I use it on the BSDs. This is neither compatibility nor
interoperability.
*
The defaults are wrong. Much of my GUI is processes that run in
dæmon context. By default, I /want/ to see processes in sessions
that have no controlling terminal. The |-x| option is the wrong way
around.
*
The defaults are wrong. Most of the time I want to see all users'
processes. The |-a| option is the wrong way around. (Yes, most of
the time I want to "see processes from other users" in Windows, too.)
*
Indeed, even in the unusual case where I am interested in only my
own processes, my own processes /include/ set-UID processes spawned
by processes running as my account, such as |urxvtd|, which is /my/
Unicode rxvt dæmon.
*
The defaults are wrong. Most of the time I do not want to see
kernel processes.
*
When I use both the |comm| and |args| columns, I don't need an extra
copy of the former put in brackets in the latter.
*
When I use the |comm| and |args| columns with |f|, I don't need both
columns to have the tree diagram added to them, especially as it
usually then obscures what is in the actual column, that I wanted to
see. Notice how FreeBSD |ps| only puts the tree diagram in if
|args| is the last column. Do that.
*
Your "BSD personality" should be giving me |-d| anyway, not |f|, as
that is the actual option on the BSDs. I don't want a tool with
Multiple Personality Disorder and Jack-of-All-Trades option parsing,
though. I want a |ps| tool that is self-consistent and logical,
with /one/ personality across all of the platforms that it works on,
and /one/ way of doing most things (albeit allowing both short and
long command-line options).
*
In fact, give me the tree diagram as its own, first class, column,
as well.
*
My terminal emulators speak UTF-8 and have switchable fonts. Their
grave accent sometimes really looks like a grave accent; and their
minus sign sometimes really looks like a minus sign. Give me proper
line drawing characters. It's ridiculous giving me a "BSD
personality" from the 1980s and yet a TUI that does not even do TUI
line drawing as well as it was done on MS/PC/DR-DOS in the 1980s.
*
The defaults are wrong. It is the 21st century. I haven't used a
terminal with only the choices of 80 or 132 columns in years. Stop
giving me 132 columns as the primary alternative behaviour.
*
The Single UNIX Specification has standardized the |COLUMNS|
environment variable as a way for me to tell you how many columns I
want, for many years, now. Don't give me idiosyncratic command-line
option mechanisms of your own. Don't give me "It's unspecified.".
Give me the |COLUMNS| environment variable.
*
The defaults are wrong. I'm piping your output through |less|,
which knows how to sideways scroll. Release your right margin when
standard output is not a terminal device. I do not need the final
column to be of "undefined" width. I need it to be defined, as
having unlimited width. For any column type, not just one or two of
them.
*
Indeed, if I am piping output give me the option of releasing the
width restrictions on all columns, not just the last one. I might
want to have both the |env| and |args| columns, with neither truncated.
*
Don't give me |-u| , |-v| , |-l| , |-f| , |-j| and tell me that they
are "user", "virtual", "long", "full", and "jobs", especially if you
aren't going to give me long options or aren't even going to
document what those are. Give me at the least a |--format| option
that takes |user|, |virtual|, |long|, |full|, and |jobs|. Indeed,
give me a |--format| option that has /all/ of the shorthands from
|procstat|. (But that, unlike |procstat|, can combine with |-o| and
itself rather than give me a mutually-exclusive choice amongst
things none of which are /quite/ what I want.)
*
In fact, give me just |--output| for selecting columns individually
and |--format| for adding predefined handy sets of columns, and
allow them to combine as I see fit.
*
Give me |--no-headers| too.
*
Give me the option of TAB rather than SPC as column separator whilst
you are at it. Then I can run it through tools that understand
tables-of-one-line-per-record-with-TAB-separated-fields text. (No,
I'm not grepping the process tree. I'm handling table formatting
with generic tools for the job rather with your idiosyncratic
mechanisms.) Give me |strvis(VIS_CSTYLE|VIS_WHITE)| on the field
contents, so that the TABs and other whitespace are unambiguous.
Indeed, give me the option of US as the field separator and RS as
the record separator, and I can run it through tools that understand
those.
Received on Sat Jan 05 2019 - 14:41:29 UTC