]> granicus.if.org Git - psmisc/commitdiff
pstree: make the long version of option -c describe what it does
authorBenno Schulenberg <bensberg@telfort.nl>
Sat, 22 Jun 2019 14:05:30 +0000 (16:05 +0200)
committerCraig Small <csmall@enc.com.au>
Thu, 12 Sep 2019 10:45:39 +0000 (20:45 +1000)
Having a long option that says the opposite of what it actually does
is awkward.  Choose to just extend its name to --compact-not, so that
scripts that use --compact will continue to work.

doc/pstree.1
src/pstree.c

index 6cb82e987fae1b9c6866088cf682a7ab7f43d90c..4734ecd9349b81c58631766fe1056b6134fa374a 100644 (file)
@@ -13,7 +13,7 @@ pstree \- display a tree of processes
 .ad l
 .B pstree
 .RB [ \-a  , \ \-\-arguments ]
-.RB [ \-c  , \ \-\-compact ]
+.RB [ \-c  , \ \-\-compact\-not ]
 .RB [ \-g  , \ \-\-show\-pgids ]
 .RB [ \-h  , \ \-\-highlight\-all  , \ \-H \fIpid\fB  , \ \-\-highlight\-pid\ \fIpid\fB ]
 .RB [ \-l  , \ \-\-long ]
index 0ca96f80576742dceeee109d7a9c198047b21529..7419bc7d567a6428d393366bf2304cb512163bd3 100644 (file)
@@ -1102,7 +1102,7 @@ static void usage(void)
     fprintf(stderr, _(
              "  -a, --arguments     show command line arguments\n"
              "  -A, --ascii         use ASCII line drawing characters\n"
-             "  -c, --compact       don't compact identical subtrees\n"));
+             "  -c, --compact-not   don't compact identical subtrees\n"));
     fprintf(stderr, _(
              "  -g, --show-pgids    show process group ids; implies -c\n"
              "  -G, --vt100         use VT100 line drawing characters\n"));
@@ -1165,7 +1165,7 @@ int main(int argc, char **argv)
     struct option options[] = {
         {"arguments", 0, NULL, 'a'},
         {"ascii", 0, NULL, 'A'},
-        {"compact", 0, NULL, 'c'},
+        {"compact-not", 0, NULL, 'c'},
         {"vt100", 0, NULL, 'G'},
         {"highlight-all", 0, NULL, 'h'},
         {"highlight-pid", 1, NULL, 'H'},