diff --git a/pisi/cli/commands.py b/pisi/cli/commands.py index 39e55538..7fb19f40 100644 --- a/pisi/cli/commands.py +++ b/pisi/cli/commands.py @@ -111,7 +111,10 @@ class Command(object): def format_name(self): (name, shortname) = self.name() - return "%s (%s)" % (name, shortname) + if shortname: + return "%s (%s)" % (name, shortname) + else: + return name def help(self): """print help for the command""" @@ -126,21 +129,19 @@ class Command(object): class Help(Command): - """Prints help for a given command + """Prints help Usage: help ... If run without parameters will print the general usage documentation. If run with a command name as the parameter will print the documentation -for that command, where command is one of: - -""" - +for that command.""" + def __init__(self): #TODO? Discard Help's own usage doc in favor of general usage doc #self.__doc__ = usage_text - self.__doc__ += commands_string() + #self.__doc__ += commands_string() super(Help, self).__init__() def name(self): diff --git a/pisi/cli/common.py b/pisi/cli/common.py index cf2cef0d..dafc30c7 100644 --- a/pisi/cli/common.py +++ b/pisi/cli/common.py @@ -16,8 +16,6 @@ where is one of: usage_text2 = """ Use \"%prog help \" for help on a specific command. - -PiSi Package Manager """ def commonopts(parser):