options: add -? as a synonym of -h (--help), but leave it undocumented

This option was lost six years ago in commit 43019189, without giving a
reason for it.  It's not really needed, but it doesn't hurt to have it.
This commit is contained in:
Benno Schulenberg 2020-10-01 10:45:22 +02:00
parent d6c194265f
commit 5bd92d4c60
1 changed files with 2 additions and 1 deletions

View File

@ -1850,7 +1850,7 @@ int main(int argc, char **argv)
SET(RESTRICTED);
while ((optchr = getopt_long(argc, argv, "!%ABC:DEFGHIJ:KLMNOPQ:RST:UVWX:Y:Z"
"abcdef:ghijklmno:pqr:s:tuvwxyz$", long_options, NULL)) != -1) {
"abcdef:ghijklmno:pqr:s:tuvwxyz$?", long_options, NULL)) != -1) {
switch (optchr) {
#ifdef HAVE_LIBMAGIC
case '!':
@ -2011,6 +2011,7 @@ int main(int argc, char **argv)
break;
#endif
case 'h':
case '?':
usage();
exit(0);
#ifndef NANO_TINY