From: Jim Warner Date: Wed, 26 Jan 2022 06:00:00 +0000 (-0600) Subject: top: tweak the heck out of some command line help text X-Git-Tag: v4.0.0~49 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9ad78da98499d61bbeb4c6875c268e566afa58ab;p=procps-ng top: tweak the heck out of some command line help text This patch began as just an attempt to make any option which also included an argument a little more readable by adding one space before the '=ARGUMENT' convention. [ by the way, i don't agree with most of those other ] [ procps-ng programs that use an '' convention. ] [ it's too easily misread as an 'optional' argument. ] [ top uses a convention like that found in coreutils ] [ albeit now with one extra space before the equals. ] In adjusting those arguments it was apparent that many explanations already lined up nicely at the right hand margin. So, this commit will force right-justification with all explanations (as we do with commit messages). [ and as a final challenge, for those options taking ] [ an argument, that argument was repeated within the ] [ explanation and made the rightmost item on a line. ] Signed-off-by: Jim Warner --- diff --git a/top/top_nls.c b/top/top_nls.c index 09e81a9c..38e1867d 100644 --- a/top/top_nls.c +++ b/top/top_nls.c @@ -380,26 +380,26 @@ static void build_norm_nlstab (void) { " %s [options]\n" "\n" "Options:\n" - " -b, --batch-mode run in non-iteractive batch mode\n" - " -c, --cmdline-toggle reverse last remembered 'c' state\n" - " -d, --delay=SECONDS delay time between updates\n" - " -E, --scale-summary-mem=SCALE scale memory as: k,m,g,t,p or e\n" - " -e, --scale-task-mem=SCALE scale memory as: k,m,g,t or p\n" - " -H, --threads-show display individual threads\n" - " -i, --idle-toggle reverse last remembered 'i' state\n" - " -n, --iterations=NUMBER maximum number of iterations\n" - " -O, --list-fields output field names and exit\n" - " -o, --sort-override=FIELD force sorting on FIELD name\n" - " -p, --pid=PIDLIST monitor only specified process IDs\n" - " -S, --accum-time-toggle reverse last remembered 'S' state\n" - " -s, --secure-mode force secure mode operation\n" - " -U, --filter-any-user=USER show only processes owned by USER\n" - " -u, --filter-only-euser=USER show only processes owned by USER\n" - " -w, --width [=COLUMNS] override terminal width\n" - " -1, --single-cpu-toggle reverse last remembered '1' state\n" + " -b, --batch-mode run in non-interactive batch mode\n" + " -c, --cmdline-toggle reverse last remembered 'c' state\n" + " -d, --delay =SECS [.TENTHS] iterative delay as SECS [.TENTHS]\n" + " -E, --scale-summary-mem =SCALE set mem as: k,m,g,t,p,e for SCALE\n" + " -e, --scale-task-mem =SCALE set mem with: k,m,g,t,p for SCALE\n" + " -H, --threads-show show tasks plus all their threads\n" + " -i, --idle-toggle reverse last remembered 'i' state\n" + " -n, --iterations =NUMBER exit on maximum iterations NUMBER\n" + " -O, --list-fields output all field names, then exit\n" + " -o, --sort-override =FIELD force sorting on this named FIELD\n" + " -p, --pid =PIDLIST monitor only the tasks in PIDLIST\n" + " -S, --accum-time-toggle reverse last remembered 'S' state\n" + " -s, --secure-mode run with secure mode restrictions\n" + " -U, --filter-any-user =USER show only processes owned by USER\n" + " -u, --filter-only-euser =USER show only processes owned by USER\n" + " -w, --width [=COLUMNS] change print width [,use COLUMNS]\n" + " -1, --single-cpu-toggle reverse last remembered '1' state\n" "\n" - " -h, --help display this help and exit\n" - " -V, --version output version information and exit\n" + " -h, --help display this help text, then exit\n" + " -V, --version output version information & exit\n" "\n" "For more details see top(1)."); Norm_nlstab[BAD_delayint_fmt] = _("bad delay interval '%s'");