From: Benno Schulenberg Date: Sat, 22 Jun 2019 14:05:30 +0000 (+0200) Subject: pstree: make the long version of option -c describe what it does X-Git-Tag: v23.3~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1bb14be703e63859b174fe81ce98d665f21f2e06;p=psmisc pstree: make the long version of option -c describe what it does 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. --- diff --git a/doc/pstree.1 b/doc/pstree.1 index 6cb82e9..4734ecd 100644 --- a/doc/pstree.1 +++ b/doc/pstree.1 @@ -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 ] diff --git a/src/pstree.c b/src/pstree.c index 0ca96f8..7419bc7 100644 --- a/src/pstree.c +++ b/src/pstree.c @@ -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'},