Man pages and usage messages review
Hello,
I reviewed consistency of man pages and usage messages in almost all utilities shipped within kbd. Patch attached.
Best regards,
Vitezslav Crhonek
commit 2e0a25a56102a98a8ce7d5bad0f713f2d36a8f77
Author: Vitezslav Crhonek <[email protected]> Date: Tue Apr 26 13:12:50 2016 +0200
Improve consistency of man pages and usage messages.
docs/man/man1/dumpkeys.1.in +21 -6
@@ -5,10 +5,15 @@ dumpkeys \- dump keyboard translation tables .SH SYNOPSIS .B dumpkeys [ -.B \-hilfn +.\".B \-1Vdfhiklnstv +.B \-h \-\-help \-i \-\-short\-info \-l \-s \-\-long\-info +.B \-n \-\-numeric \-f \-\-full\-table \-1 \-\-separate-lines +.BI \-S shape +.BI \-\-shape= shape +.B \-t \-\-funcs\-only \-k \-\-keys\-only \-d \-\-compose\-only .BI \-c charset -.B \-\-help \-\-short\-info \-\-long\-info \-\-numeric \-\-full\-table \-\-funcs\-only \-\-keys\-only \-\-compose\-only .BI \-\-charset= charset +.B \-v \-\-verbose \-V \-\-version ] .SH DESCRIPTION .IX "dumpkeys command" "" "\fLdumpkeys\fR command"
@@ -121,7 +126,7 @@ You can see you current function key definitions with the command .RE .LP .TP -.B \-l \-\-long-info +.B \-l \-s \-\-long-info This option instructs .B dumpkeys to print a long information listing. The output is the same as with the
@@ -156,7 +161,10 @@ output of .BR dumpkeys . .LP .TP -.B \-\-funcs-only +.BI \-S shape " " " " \-\-shape= shape +.LP +.TP +.B \-t \-\-funcs-only When this option is given, .B dumpkeys prints only the function key string definitions. Normally
@@ -164,7 +172,7 @@ prints only the function key string definitions. Normally prints both the key bindings and the string definitions. .LP .TP -.B \-\-keys-only +.B \-k \-\-keys-only When this option is given, .B dumpkeys prints only the key bindings. Normally
@@ -172,7 +180,7 @@ prints only the key bindings. Normally prints both the key bindings and the string definitions. .LP .TP -.B \-\-compose-only +.B \-d \-\-compose-only When this option is given, .B dumpkeys prints only the compose key combinations.
@@ -197,6 +205,13 @@ This option produces an output line `charset "iso-8859-X"', telling loadkeys how to interpret the keymap. (For example, "division" is 0xf7 in iso-8859-1 but 0xba in iso-8859-8.) .LP +.TP +.B \-v \-\-verbose +.LP +.TP +.B \-V \-\-version +Prints the program's version number and exits. +.LP .SH FILES .PD 0 .TP 20
docs/man/man1/fgconsole.1 +13 -1
@@ -5,7 +5,13 @@ fgconsole \- print the number of the active VT. .SH SYNOPSIS .B fgconsole -.BI [ "--help" | "--version" | "--next-available" ] +.BI [ +\-h \-\-help +| +\-V \-\-version +| +\-n \-\-next-available +] .SH DESCRIPTION If the active Virtual Terminal is .IR /dev/ttyN ,
@@ -17,6 +23,12 @@ If the console is a serial console, then "serial" is printed instead. .TP +.I \-h \-\-help +Displays short usage message and exits. +.TP +.I \-V \-\-version +Prints version number and exits. +.TP .I \-\-next\-available Will show the next unallocated virtual terminal. Normally 6 virtual terminals are allocated, with number 7 used for X; this will return
docs/man/man1/loadkeys.1.in +18 -0
@@ -5,6 +5,9 @@ loadkeys \- load keyboard translation tables .SH SYNOPSIS .B loadkeys [ +.I -a --ascii +] [ +[ .I -b --bkeymap ] [ .I -c --clearcompose
@@ -19,6 +22,8 @@ loadkeys \- load keyboard translation tables ] [ .I -m --mktable ] [ +.I -p --parse +] [ .I -q --quiet ] [ .I -s --clearstrings
@@ -27,6 +32,8 @@ loadkeys \- load keyboard translation tables ] [ .I -v --verbose ] [ +.I -V --version +] [ .I filename... ] .LP
@@ -177,14 +184,25 @@ instead of using the option. .SH "OTHER OPTIONS" .TP +.B \-a \-\-ascii +Force conversion to ASCII. +.TP .B \-h \-\-help .B loadkeys prints its version number and a short usage message to the programs standard error output and exits. .TP +.B \-p \-\-parse +.B loadkeys +searchs and parses keymap without action. +.TP .B \-q \-\-quiet .B loadkeys suppresses all normal output. +.TP +.B \-V \-\-version +.B loadkeys +prints its version number and exits. .SH WARNING Note that anyone having read access to .B /dev/console
docs/man/man1/showkey.1 +5 -1
@@ -3,7 +3,7 @@ .SH NAME showkey \- examine the codes sent by the keyboard .SH SYNOPSIS -showkey [\-h|\-\-help] [\-a|\-\-ascii] [\-s|\-\-scancodes] [\-k|\-\-keycodes] +showkey [\-h|\-\-help] [\-a|\-\-ascii] [\-s|\-\-scancodes] [\-k|\-\-keycodes] [\-V|\-\-version] .SH DESCRIPTION .IX "showkey command" "" "\fLshowkey\fR command" .LP
@@ -66,6 +66,10 @@ are present. Starts .B showkey in `ascii' dump mode. +.TP +\-V \-\-version +.B showkey +prints version and exits. .SH "2.6 KERNELS" In 2.6 kernels key codes lie in the range 1-255, instead of 1-127. Key codes larger than 127 are returned as three bytes of which the
docs/man/man8/kbdrate.8 +1 -1
@@ -48,7 +48,7 @@ For Intel-based systems, the allowable range is from 250 to 1000 ms, in 250 ms steps. For SPARC systems, possible values are between 10 ms and 1440 ms, in 10 ms steps. .TP -.B \-V +.B \-V \-\-version Display a version number and exit. .SH BUGS Not all keyboards support all rates.
docs/man/man8/mapscrn.8.in +8 -1
@@ -3,7 +3,7 @@ .SH NAME mapscrn \- load screen output mapping table .SH SYNOPSIS -.BR mapscrn " [" -v "] [" -o +.BR mapscrn " [" -V "] [" -v "] [" -o .IR map.orig ] .I mapfile .SH DESCRIPTION
@@ -96,6 +96,13 @@ Single (possibly multi-byte) UTF-8 character, enclosed in single quotes. Note that control characters (with codes < 32) cannot be re-mapped with .I mapscrn because they have special meaning for the driver. +.SH OTHER OPTIONS +.TP +.B \-V +Display a version number and exit. +.TP +.B \-v +Be verbose. .SH FILES .I @DATADIR@/consoletrans is the default directory for screen mappings.
docs/man/man8/setvtrgb.8 +9 -1
@@ -4,7 +4,7 @@ setvtrgb \- set the virtual terminal RGB colors .SH SYNOPSIS .B setvtrgb -.I vga|FILE|\- +.I \-h|\-V|vga|FILE|\- .SH DESCRIPTION The .I setvtrgb
@@ -30,6 +30,14 @@ To seed a valid And then edit the values in .B FILE +.SH OTHER OPTIONS +.TP +\-h +Prints usage and exits. +.TP +\-V +Prints version and exists. + .SH AUTHOR The utility is written by Alexey Gladkov, Seth Forshee, Dustin Kirkland.
docs/man/man8/showconsolefont.8 +5 -1
@@ -6,10 +6,12 @@ showconsolefont \- Show the current EGA/VGA console screen font .SH SYNOPSIS .B showconsolefont [ -.B \-V +.B \-V | \-\-version ] [ .B \-v ] [ +.B \-i +] [ .B \-C .I console ]
@@ -20,6 +22,8 @@ The command outputs the current console font to stdout. The option \-v prints additional information, while the option \-V prints the program version number. +The option \-i doesn't print out the font table, +just shows ROWSxCOLSxCOUNT and exits. On Linux 2.6.1 and later, the option \-C allows one to indicate the console involved. Its argument is a pathname.
src/dumpkeys.c +9 -4
@@ -33,19 +33,24 @@ valid options are:\n\ \n\ -h --help display this help text\n\ -i --short-info display information about keyboard driver\n\ - -l --long-info display above and symbols known to loadkeys\n\ + -l -s --long-info display above and symbols known to loadkeys\n\ -n --numeric display keytable in hexadecimal notation\n\ -f --full-table don't use short-hand notations, one row per keycode\n\ -1 --separate-lines one line per (modifier,keycode) pair\n\ - --funcs-only display only the function key strings\n\ - --keys-only display only key bindings\n\ - --compose-only display only compose key combinations\n\ + -S --shape=\n\ + -t --funcs-only display only the function key strings\n\ + -k --keys-only display only key bindings\n\ + -d --compose-only display only compose key combinations\n\ -c --charset="));lk_list_charsets (stderr);fprintf (stderr,_ ("\ interpret character action codes to be from the\n\ specified character set\n\ " )); +fprintf (stderr,_ ("\ +-v --verbose\n\ +-V --version display version\n\ +" ));exit (1 ); }
src/kbdinfo.c +4 -1
@@ -18,7 +18,10 @@ usage(int code) {_ ("Usage: %1$s [-C DEVICE] getmode [text|graphics]\n" " or: %1$s [-C DEVICE] gkbmode [raw|xlate|mediumraw|unicode]\n" " or: %1$s [-C DEVICE] gkbmeta [metabit|escprefix]\n" -" or: %1$s [-C DEVICE] gkbled [scrolllock|numlock|capslock]\n" ), +" or: %1$s [-C DEVICE] gkbled [scrolllock|numlock|capslock]\n" +"Other options:\n" +" -h display this help text\n" +" -V display program version\n" ), progname);exit (code); }
src/kbdrate.c +2 -2
@@ -247,7 +247,7 @@ main( int argc, char **argv ) { (!strcmp(argv[1], "-V") || !strcmp(argv[1], "--version")))print_version_and_exit (); -while ( (c =getopt ( argc, argv,"r:d:sv" )) !=EOF ) { +while ( (c =getopt ( argc, argv,"r:d:s" )) !=EOF ) {switch (c) {case 'r' : rate =atof ( optarg );
@@ -260,7 +260,7 @@ main( int argc, char **argv ) {break ;default :fprintf (stderr, -_ ("Usage: kbdrate [-V] [-s] [-r rate] [-d delay]\n" )); +_ ("Usage: kbdrate [-V | --version] [-s] [-r rate] [-d delay]\n" ));exit (EXIT_FAILURE ); } }
src/loadkeys.c +2 -1
@@ -50,7 +50,8 @@ usage(void)" -q --quiet suppress all normal output\n" " -s --clearstrings clear kernel string table\n" " -u --unicode force conversion to Unicode\n" - " -v --verbose report the changes\n"), +" -v --verbose report the changes\n" + " -V --version display version\n"), PACKAGE_VERSION, progname, DEFMAP);exit (EXIT_FAILURE ); }
src/mapscrn.c +1 -1
@@ -65,7 +65,7 @@ main(int argc, char *argv[]) { }if (argc !=2 ) { -fprintf (stderr,_ ("usage: %s [-v] [-o map.orig] map-file\n" ), +fprintf (stderr,_ ("usage: %s [-V] [-v] [-o map.orig] map-file\n" ), progname);exit (1 ); }
src/setvtrgb.c +7 -2
@@ -39,7 +39,8 @@ static void __attribute__ ((noreturn)) usage(int code) { fprintf(stderr, - _("Usage: %s vga|FILE|-\n" + _("Usage: %s [-h] [-V]\n" + " %s vga|FILE|-\n" "\n" "If you use the FILE parameter, FILE should be exactly 3 lines of\n" "comma-separated decimal values for RED, GREEN, and BLUE.\n"
@@ -48,8 +49,12 @@ usage(int code)" cat /sys/module/vt/parameters/default_{red,grn,blu} > FILE\n" "\n" "and then edit the values in FILE.\n" +"\n" +"Other options:\n" +" -h prints usage and exits\n" +" -V prints version and exits\n" "\n"), - progname); + progname, progname);exit (code); }
src/showconsolefont.c +5 -4
@@ -97,10 +97,11 @@ usage(void) {"(probably after loading a font with `setfont font')\n" "\n" "Valid options are:\n" -" -C tty Device to read the font from. Default: current tty.\n" -" -v Be more verbose.\n" -" -i Don't print out the font table, just show\n" - " ROWSxCOLSxCOUNT and exit.\n")); +" -V --version Print version and exit.\n" +" -C tty Device to read the font from. Default: current tty.\n" +" -v Be more verbose.\n" +" -i Don't print out the font table, just show\n" + " ROWSxCOLSxCOUNT and exit.\n"));exit (EXIT_FAILURE ); }
src/showkey.c +1 -0
@@ -86,6 +86,7 @@ usage(void) {" -a --ascii display the decimal/octal/hex values of the keys\n" " -s --scancodes display only the raw scan-codes\n" " -k --keycodes display only the interpreted keycodes (default)\n" +" -V --version display version\n" ), PACKAGE_VERSION);exit (EXIT_FAILURE ); }
Quoted 5 lines · Vitezslav Crhonek
I reviewed consistency of man pages and usage messages in almost all utilities shipped within kbd. Patch attached.
Best regards,
Vitezslav Crhonek
Thanks for your work!
I think that there can be even more consistency:
$ grep ' version' kbd-documentation-consistency.patch | grep -v usage +Prints the program's version number and exits. +Prints version number and exits. +prints its version number and exits. +prints version and exits. Display a version number and exit. +Display a version number and exit. +Prints version and exists. the option \-V prints the program version number. + -V --version display version\n\ + " -V display program version\n"), + " -V --version display version\n"), + " -V prints version and exits\n" + " -V --version Print version and exit.\n" +" -V --version display version\n"
Felix
Quoted 28 lines · Felix Janda
Quoted 5 lines · Vitezslav Crhonek
I reviewed consistency of man pages and usage messages in almost all utilities shipped within kbd. Patch attached.
Best regards,
Vitezslav CrhonekThanks for your work!
I think that there can be even more consistency:
$ grep ' version' kbd-documentation-consistency.patch | grep -v usage(quoted diff) +12
-0+Prints the program's version number and exits. +Prints version number and exits. +prints its version number and exits. +prints version and exits. Display a version number and exit. +Display a version number and exit. +Prints version and exists. the option \-V prints the program version number. + -V --version display version\n\ + " -V display program version\n"), + " -V --version display version\n"), + " -V prints version and exits\n" + " -V --version Print version and exit.\n" +" -V --version display version\n"
Quoted 1 line
Felix
Well, I meant content consistency in particular, not exact wording, but yeah, you're right.
Vita
Quoted 2 lines · Vitezslav Crhonek
Well, I meant content consistency in particular, not exact wording, but yeah, you're right.
So you add it in the patch ?
Signature · 1 line
Rgrds, legion
Quoted 6 lines · Alexey Gladkov
Quoted 2 lines · Vitezslav Crhonek
Well, I meant content consistency in particular, not exact wording, but yeah, you're right.
So you add it in the patch ?
Attached.
I unified the wording in messages I'd added, didn't touch already described options. I hope it's fine now.
Two notes regarding dumpkeys:
- "--long-info" option has two short variants "-l" and "-s". I added "-s" to the man page and usage message. But I'm not sure if it's available intentionally. Maybe "-s" shouldn't be accepted by the program at all rather than be added to the docs?
- It would be nice to describe "--shape" "-S" option a bit, but I don't know its exact functionality, so I left it alone in the man page.
Best regards,
Vita
Quoted 1 line
From
590f62a2a218191d1655e3a69113186add880b94Mon Sep 17 00:00:00 2001
From: Vitezslav Crhonek <[email protected]>
Date: Mon, 9 May 2016 13:24:14 +0200
Subject: [PATCH] Improve consistency of man pages and usage messages.
--- docs/man/man1/dumpkeys.1.in | 27 +++++++++++++++++++++------ docs/man/man1/fgconsole.1 | 14 +++++++++++++- docs/man/man1/loadkeys.1.in | 18 ++++++++++++++++++ docs/man/man1/showkey.1 | 6 +++++- docs/man/man8/kbdrate.8 | 2 +- docs/man/man8/mapscrn.8.in | 9 ++++++++- docs/man/man8/setvtrgb.8 | 10 +++++++++- docs/man/man8/showconsolefont.8 | 6 +++++- src/dumpkeys.c | 13 +++++++++---- src/kbdinfo.c | 5 ++++- src/kbdrate.c | 4 ++-- src/loadkeys.c | 3 ++- src/mapscrn.c | 2 +- src/setvtrgb.c | 9 +++++++-- src/showconsolefont.c | 9 +++++---- src/showkey.c | 1 + 16 files changed, 111 insertions(+), 27 deletions(-)
docs/man/man1/dumpkeys.1.in +21 -6
@@ -5,10 +5,15 @@ dumpkeys \- dump keyboard translation tables .SH SYNOPSIS .B dumpkeys [ -.B \-hilfn +.\".B \-1Vdfhiklnstv +.B \-h \-\-help \-i \-\-short\-info \-l \-s \-\-long\-info +.B \-n \-\-numeric \-f \-\-full\-table \-1 \-\-separate-lines +.BI \-S shape +.BI \-\-shape= shape +.B \-t \-\-funcs\-only \-k \-\-keys\-only \-d \-\-compose\-only .BI \-c charset -.B \-\-help \-\-short\-info \-\-long\-info \-\-numeric \-\-full\-table \-\-funcs\-only \-\-keys\-only \-\-compose\-only .BI \-\-charset= charset +.B \-v \-\-verbose \-V \-\-version ] .SH DESCRIPTION .IX "dumpkeys command" "" "\fLdumpkeys\fR command"
@@ -121,7 +126,7 @@ You can see you current function key definitions with the command .RE .LP .TP -.B \-l \-\-long-info +.B \-l \-s \-\-long-info This option instructs .B dumpkeys to print a long information listing. The output is the same as with the
@@ -156,7 +161,10 @@ output of .BR dumpkeys . .LP .TP -.B \-\-funcs-only +.BI \-S shape " " " " \-\-shape= shape +.LP +.TP +.B \-t \-\-funcs-only When this option is given, .B dumpkeys prints only the function key string definitions. Normally
@@ -164,7 +172,7 @@ prints only the function key string definitions. Normally prints both the key bindings and the string definitions. .LP .TP -.B \-\-keys-only +.B \-k \-\-keys-only When this option is given, .B dumpkeys prints only the key bindings. Normally
@@ -172,7 +180,7 @@ prints only the key bindings. Normally prints both the key bindings and the string definitions. .LP .TP -.B \-\-compose-only +.B \-d \-\-compose-only When this option is given, .B dumpkeys prints only the compose key combinations.
@@ -197,6 +205,13 @@ This option produces an output line `charset "iso-8859-X"', telling loadkeys how to interpret the keymap. (For example, "division" is 0xf7 in iso-8859-1 but 0xba in iso-8859-8.) .LP +.TP +.B \-v \-\-verbose +.LP +.TP +.B \-V \-\-version +Prints version number and exits. +.LP .SH FILES .PD 0 .TP 20
docs/man/man1/fgconsole.1 +13 -1
@@ -5,7 +5,13 @@ fgconsole \- print the number of the active VT. .SH SYNOPSIS .B fgconsole -.BI [ "--help" | "--version" | "--next-available" ] +.BI [ +\-h \-\-help +| +\-V \-\-version +| +\-n \-\-next-available +] .SH DESCRIPTION If the active Virtual Terminal is .IR /dev/ttyN ,
@@ -17,6 +23,12 @@ If the console is a serial console, then "serial" is printed instead. .TP +.I \-h \-\-help +Prints short usage message and exits. +.TP +.I \-V \-\-version +Prints version number and exits. +.TP .I \-\-next\-available Will show the next unallocated virtual terminal. Normally 6 virtual terminals are allocated, with number 7 used for X; this will return
docs/man/man1/loadkeys.1.in +18 -0
@@ -5,6 +5,9 @@ loadkeys \- load keyboard translation tables .SH SYNOPSIS .B loadkeys [ +.I -a --ascii +] [ +[ .I -b --bkeymap ] [ .I -c --clearcompose
@@ -19,6 +22,8 @@ loadkeys \- load keyboard translation tables ] [ .I -m --mktable ] [ +.I -p --parse +] [ .I -q --quiet ] [ .I -s --clearstrings
@@ -27,6 +32,8 @@ loadkeys \- load keyboard translation tables ] [ .I -v --verbose ] [ +.I -V --version +] [ .I filename... ] .LP
@@ -177,14 +184,25 @@ instead of using the option. .SH "OTHER OPTIONS" .TP +.B \-a \-\-ascii +Force conversion to ASCII. +.TP .B \-h \-\-help .B loadkeys prints its version number and a short usage message to the programs standard error output and exits. .TP +.B \-p \-\-parse +.B loadkeys +searchs and parses keymap without action. +.TP .B \-q \-\-quiet .B loadkeys suppresses all normal output. +.TP +.B \-V \-\-version +.B loadkeys +prints version number and exits. .SH WARNING Note that anyone having read access to .B /dev/console
docs/man/man1/showkey.1 +5 -1
@@ -3,7 +3,7 @@ .SH NAME showkey \- examine the codes sent by the keyboard .SH SYNOPSIS -showkey [\-h|\-\-help] [\-a|\-\-ascii] [\-s|\-\-scancodes] [\-k|\-\-keycodes] +showkey [\-h|\-\-help] [\-a|\-\-ascii] [\-s|\-\-scancodes] [\-k|\-\-keycodes] [\-V|\-\-version] .SH DESCRIPTION .IX "showkey command" "" "\fLshowkey\fR command" .LP
@@ -66,6 +66,10 @@ are present. Starts .B showkey in `ascii' dump mode. +.TP +\-V \-\-version +.B showkey +prints version number and exits. .SH "2.6 KERNELS" In 2.6 kernels key codes lie in the range 1-255, instead of 1-127. Key codes larger than 127 are returned as three bytes of which the
docs/man/man8/kbdrate.8 +1 -1
@@ -48,7 +48,7 @@ For Intel-based systems, the allowable range is from 250 to 1000 ms, in 250 ms steps. For SPARC systems, possible values are between 10 ms and 1440 ms, in 10 ms steps. .TP -.B \-V +.B \-V \-\-version Display a version number and exit. .SH BUGS Not all keyboards support all rates.
docs/man/man8/mapscrn.8.in +8 -1
@@ -3,7 +3,7 @@ .SH NAME mapscrn \- load screen output mapping table .SH SYNOPSIS -.BR mapscrn " [" -v "] [" -o +.BR mapscrn " [" -V "] [" -v "] [" -o .IR map.orig ] .I mapfile .SH DESCRIPTION
@@ -96,6 +96,13 @@ Single (possibly multi-byte) UTF-8 character, enclosed in single quotes. Note that control characters (with codes < 32) cannot be re-mapped with .I mapscrn because they have special meaning for the driver. +.SH OTHER OPTIONS +.TP +.B \-V +Prints version number and exits. +.TP +.B \-v +Be verbose. .SH FILES .I @DATADIR@/consoletrans is the default directory for screen mappings.
docs/man/man8/setvtrgb.8 +9 -1
@@ -4,7 +4,7 @@ setvtrgb \- set the virtual terminal RGB colors .SH SYNOPSIS .B setvtrgb -.I vga|FILE|\- +.I \-h|\-V|vga|FILE|\- .SH DESCRIPTION The .I setvtrgb
@@ -30,6 +30,14 @@ To seed a valid And then edit the values in .B FILE +.SH OTHER OPTIONS +.TP +\-h +Prints usage message and exits. +.TP +\-V +Prints version number and exists. + .SH AUTHOR The utility is written by Alexey Gladkov, Seth Forshee, Dustin Kirkland.
docs/man/man8/showconsolefont.8 +5 -1
@@ -6,10 +6,12 @@ showconsolefont \- Show the current EGA/VGA console screen font .SH SYNOPSIS .B showconsolefont [ -.B \-V +.B \-V | \-\-version ] [ .B \-v ] [ +.B \-i +] [ .B \-C .I console ]
@@ -20,6 +22,8 @@ The command outputs the current console font to stdout. The option \-v prints additional information, while the option \-V prints the program version number. +The option \-i doesn't print out the font table, +just shows ROWSxCOLSxCOUNT and exits. On Linux 2.6.1 and later, the option \-C allows one to indicate the console involved. Its argument is a pathname.
src/dumpkeys.c +9 -4
@@ -33,19 +33,24 @@ valid options are:\n\ \n\ -h --help display this help text\n\ -i --short-info display information about keyboard driver\n\ - -l --long-info display above and symbols known to loadkeys\n\ + -l -s --long-info display above and symbols known to loadkeys\n\ -n --numeric display keytable in hexadecimal notation\n\ -f --full-table don't use short-hand notations, one row per keycode\n\ -1 --separate-lines one line per (modifier,keycode) pair\n\ - --funcs-only display only the function key strings\n\ - --keys-only display only key bindings\n\ - --compose-only display only compose key combinations\n\ + -S --shape=\n\ + -t --funcs-only display only the function key strings\n\ + -k --keys-only display only key bindings\n\ + -d --compose-only display only compose key combinations\n\ -c --charset="));lk_list_charsets (stderr);fprintf (stderr,_ ("\ interpret character action codes to be from the\n\ specified character set\n\ " )); +fprintf (stderr,_ ("\ +-v --verbose\n\ +-V --version print version number\n\ +" ));exit (1 ); }
src/kbdinfo.c +4 -1
@@ -18,7 +18,10 @@ usage(int code) {_ ("Usage: %1$s [-C DEVICE] getmode [text|graphics]\n" " or: %1$s [-C DEVICE] gkbmode [raw|xlate|mediumraw|unicode]\n" " or: %1$s [-C DEVICE] gkbmeta [metabit|escprefix]\n" -" or: %1$s [-C DEVICE] gkbled [scrolllock|numlock|capslock]\n" ), +" or: %1$s [-C DEVICE] gkbled [scrolllock|numlock|capslock]\n" +"Other options:\n" +" -h print this usage message\n" +" -V print version number\n" ), progname);exit (code); }
src/kbdrate.c +2 -2
@@ -247,7 +247,7 @@ main( int argc, char **argv ) { (!strcmp(argv[1], "-V") || !strcmp(argv[1], "--version")))print_version_and_exit (); -while ( (c =getopt ( argc, argv,"r:d:sv" )) !=EOF ) { +while ( (c =getopt ( argc, argv,"r:d:s" )) !=EOF ) {switch (c) {case 'r' : rate =atof ( optarg );
@@ -260,7 +260,7 @@ main( int argc, char **argv ) {break ;default :fprintf (stderr, -_ ("Usage: kbdrate [-V] [-s] [-r rate] [-d delay]\n" )); +_ ("Usage: kbdrate [-V | --version] [-s] [-r rate] [-d delay]\n" ));exit (EXIT_FAILURE ); } }
src/loadkeys.c +2 -1
@@ -50,7 +50,8 @@ usage(void)" -q --quiet suppress all normal output\n" " -s --clearstrings clear kernel string table\n" " -u --unicode force conversion to Unicode\n" - " -v --verbose report the changes\n"), +" -v --verbose report the changes\n" + " -V --version print version number\n"), PACKAGE_VERSION, progname, DEFMAP);exit (EXIT_FAILURE ); }
src/mapscrn.c +1 -1
@@ -65,7 +65,7 @@ main(int argc, char *argv[]) { }if (argc !=2 ) { -fprintf (stderr,_ ("usage: %s [-v] [-o map.orig] map-file\n" ), +fprintf (stderr,_ ("usage: %s [-V] [-v] [-o map.orig] map-file\n" ), progname);exit (1 ); }
src/setvtrgb.c +7 -2
@@ -39,7 +39,8 @@ static void __attribute__ ((noreturn)) usage(int code) { fprintf(stderr, - _("Usage: %s vga|FILE|-\n" + _("Usage: %s [-h] [-V]\n" + " %s vga|FILE|-\n" "\n" "If you use the FILE parameter, FILE should be exactly 3 lines of\n" "comma-separated decimal values for RED, GREEN, and BLUE.\n"
@@ -48,8 +49,12 @@ usage(int code)" cat /sys/module/vt/parameters/default_{red,grn,blu} > FILE\n" "\n" "and then edit the values in FILE.\n" +"\n" +"Other options:\n" +" -h print this usage message\n" +" -V print version number\n" "\n"), - progname); + progname, progname);exit (code); }
src/showconsolefont.c +5 -4
@@ -97,10 +97,11 @@ usage(void) {"(probably after loading a font with `setfont font')\n" "\n" "Valid options are:\n" -" -C tty Device to read the font from. Default: current tty.\n" -" -v Be more verbose.\n" -" -i Don't print out the font table, just show\n" - " ROWSxCOLSxCOUNT and exit.\n")); +" -V --version Print version number and exit.\n" +" -C tty Device to read the font from. Default: current tty.\n" +" -v Be more verbose.\n" +" -i Don't print out the font table, just show\n" + " ROWSxCOLSxCOUNT and exit.\n"));exit (EXIT_FAILURE ); }
src/showkey.c +1 -0
@@ -86,6 +86,7 @@ usage(void) {" -a --ascii display the decimal/octal/hex values of the keys\n" " -s --scancodes display only the raw scan-codes\n" " -k --keycodes display only the interpreted keycodes (default)\n" +" -V --version print version number\n" ), PACKAGE_VERSION);exit (EXIT_FAILURE ); }
Signature · 1 line
2.5.5