Bug#558214: Please provide --help option for lintian-info
Package: lintian
Version: 2.2.18
Severity: wishlist
Tags: patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The other day I typed `lintian-info --help' because I couldn't
remember the syntax for getting tag descriptions, and found out that
- --help doesn't exist. The manpage solved my question but maybe a
- --help option would be helpful for others too.
Find attached a quick patch which might server as a starting point
for help output.
Cheers,
gregor
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAksPQ1gACgkQOzKYnQDzz+TuVwCfe8QNsRJb2Q/DHzNpunGGRFjD
Xs0AnA+8hPcHWi3DymwxxDvgYzgWTXIK
=Y+yb
-----END PGP SIGNATURE-----
diff --git a/frontend/lintian-info b/frontend/lintian-info
index d8ef6c8..051934f 100755
--- a/frontend/lintian-info
+++ b/frontend/lintian-info
@@ -41,11 +41,26 @@ use Text_utils;
my %already_displayed = ();
-my ($annotate, $tags);
+my ($annotate, $tags, $help);
Getopt::Long::config('bundling', 'no_getopt_compat', 'no_auto_abbrev');
-GetOptions('annotate|a' => \$annotate, 'tags|t' => \$tags)
+GetOptions('annotate|a' => \$annotate, 'tags|t' => \$tags, 'help|h' => \$help)
or die("error parsing options\n");
+# help
+if ($help) {
+ print <<"EOT";
+Usage: lintian-info [log-file...] ...
+ lintian-info --tags tag ...
+
+Options:
+ -a, --annotate display verbose information about provided Lintian overrides
+ -t, --tags display tag descriptions
+EOT
+
+ exit 0;
+}
+
+
# If tag mode was specified, read the arguments as tags and display the
# descriptions for each one. (We don't currently display the severity,
# although that would be nice.)
Reply to: