Commits

Steve Losh  committed ba7135e

turnstile: Show command options in help output.

  • Participants
  • Parent commits 9e9b71b

Comments (0)

Files changed (1)

File lib/gorilla/turnstile/turnstile.py

     print 'USAGE:', interface[command]['usage'] % script
     print ''
     print interface[command]['handler'].__doc__
+    
+    if interface[command]['options']:
+        print ''
+        print 'OPTIONS:'
+        for long_name, option in interface[command]['options'].items():
+            short_name = '/-%s' % option['short'] if 'short' in option else ''
+            print '  --%s%s  %s' % (long_name, short_name, option['help'])
 
 
 def _validate_interface(interface):