Bläddra i källkod

Recognize -? as an alias for --help in all commands

Guillem Jover 14 år sedan
förälder
incheckning
6626906855
3 ändrade filer med 5 tillägg och 5 borttagningar
  1. 1 1
      man/dpkg-divert.8
  2. 3 3
      scripts/dpkg-scansources.pl
  3. 1 1
      src/divertcmd.c

+ 1 - 1
man/dpkg-divert.8

@@ -89,7 +89,7 @@ in case the destination file already exists.
 .B \-\-test
 Test mode, i.e. don't actually perform any changes, just demonstrate.
 .TP
-.B \-\-help
+.BR \-? ", " \-\-help
 Show the usage message and exit.
 .TP
 .B \-\-version

+ 3 - 3
scripts/dpkg-scansources.pl

@@ -2,7 +2,7 @@
 #
 # Copyright © 1999 Roderick Schertler
 # Copyright © 2002 Wichert Akkerman <wakkerma@debian.org>
-# Copyright © 2006-2009 Guillem Jover <guillem@debian.org>
+# Copyright © 2006-2009,2011-2012 Guillem Jover <guillem@debian.org>
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -63,7 +63,7 @@ my $Extra_override_file = undef;
 
 my @Option_spec = (
     'debug!'		=> \$Debug,
-    'help'		=> \&usage,
+    'help|?'		=> \&usage,
     'no-sort|n'		=> \$No_sort,
     'source-override|s=s' => \$Src_override,
     'extra-override|e=s' => \$Extra_override_file,
@@ -91,7 +91,7 @@ Options:
                            use file for additional source overrides, default
                            is regular override file with .src appended.
       --debug              turn debugging on.
-      --help               show this help message.
+  -?, --help               show this help message.
       --version            show the version.
 
 See the man page for the full documentation.

+ 1 - 1
src/divertcmd.c

@@ -754,7 +754,7 @@ static const struct cmdinfo cmdinfos[] = {
 	{ "quiet",      0,   0,  &opt_verbose, NULL,      NULL, 0       },
 	{ "rename",     0,   0,  &opt_rename,  NULL,      NULL, 1       },
 	{ "test",       0,   0,  &opt_test,    NULL,      NULL, 1       },
-	{ "help",       0,   0,  NULL,         NULL,      usage         },
+	{ "help",      '?',  0,  NULL,         NULL,      usage         },
 	{ "version",    0,   0,  NULL,         NULL,      printversion  },
 	{  NULL,        0                                               }
 };