[namcap] A handful of corrections to the namcap usage output
diff mbox

Message ID 20180529203627.12891-1-enckse@gmail.com
State New
Headers show

Commit Message

Eli Schwartz via arch-projects May 29, 2018, 8:36 p.m. UTC
noticed the following items in the usage output of namcap:
1. Displaying the site-packages path of namcap and not just 'namcap'
2. Missing long options in usage output
3. Not displaying anything about -h/--help (even if that's a given)

Signed-off-by: Sean Enck <enckse@gmail.com>
---
 namcap.py | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Patch
diff mbox

diff --git a/namcap.py b/namcap.py
index b62a2fa..8940e88 100755
--- a/namcap.py
+++ b/namcap.py
@@ -41,16 +41,17 @@  def get_modules():
 def usage():
 	"""Display usage information"""
 	print("")
-	print("Usage: " + sys.argv[0] + " [OPTIONS] packages")
+	print("Usage: namcap [OPTIONS] packages")
 	print("")
 	print("Options are:")
 	print("    -L, --list                       : list available rules")
-	print("    -i                               : prints information (debug) responses from rules")
-	print("    -m                               : makes the output parseable (machine-readable)")
+	print("    -i, --info                       : prints information (debug) responses from rules")
+	print("    -m, --machine-readable           : makes the output parseable (machine-readable)")
 	print("    -e rulelist, --exclude=rulelist  : don't apply RULELIST rules to the package")
 	print("    -r rulelist, --rules=rulelist    : only apply RULELIST rules to the package")
-	print("    -t tags                          : use a custom tag file")
-	print("    -v version                       : print version and exit")
+	print("    -t filename, --tags=filename     : use a custom tag file")
+	print("    -v, --version                    : print version and exit")
+	print("    -h, --help                       : print help and exit")
 
 	sys.exit(2)