chiark / gitweb /
Let "stg help" be like "stg --help"
authorKarl Hasselström <kha@treskal.com>
Wed, 25 Oct 2006 19:24:54 +0000 (20:24 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Wed, 25 Oct 2006 19:24:54 +0000 (20:24 +0100)
"stg --help" prints the list of commands, but "stg help" just prints
the usage message for the help command. This may be useful in theory,
but the distinction is probably lost on 95% of all users (and the
remaining 5% probably don't need to see the usage message for the help
command anyway, since they know how it works). So just make both
commands output the helpful command list.

Signed-off-by: Karl Hasselström <kha@treskal.com>
stgit/main.py

index e9cc6cd7b116e9f477f5f64144815684d9245ccf..53a1ac1b0d8a367f7337d06ed62021d937c0e2d8 100644 (file)
@@ -223,8 +223,7 @@ def main():
                                   option_list = command.options)
             parser.print_help()
         else:
-            print 'usage: %s help <command>' % prog
-
+            print_help()
         sys.exit(0)
     if cmd in ['-v', '--version', 'version']:
         print 'Stacked GIT %s' % version