diff options
Diffstat (limited to 'subcmds/help.py')
| -rw-r--r-- | subcmds/help.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/subcmds/help.py b/subcmds/help.py index 15aab7f9..4aa3f863 100644 --- a/subcmds/help.py +++ b/subcmds/help.py | |||
| @@ -34,8 +34,7 @@ Displays detailed usage information about a command. | |||
| 34 | def _PrintAllCommands(self): | 34 | def _PrintAllCommands(self): |
| 35 | print('usage: repo COMMAND [ARGS]') | 35 | print('usage: repo COMMAND [ARGS]') |
| 36 | print('The complete list of recognized repo commands are:') | 36 | print('The complete list of recognized repo commands are:') |
| 37 | commandNames = self.commands.keys() | 37 | commandNames = list(sorted(self.commands)) |
| 38 | commandNames.sort() | ||
| 39 | 38 | ||
| 40 | maxlen = 0 | 39 | maxlen = 0 |
| 41 | for name in commandNames: | 40 | for name in commandNames: |
| @@ -49,16 +48,15 @@ Displays detailed usage information about a command. | |||
| 49 | except AttributeError: | 48 | except AttributeError: |
| 50 | summary = '' | 49 | summary = '' |
| 51 | print(fmt % (name, summary)) | 50 | print(fmt % (name, summary)) |
| 52 | print("See 'repo help <command>' for more information on a" | 51 | print("See 'repo help <command>' for more information on a " |
| 53 | 'specific command.') | 52 | 'specific command.') |
| 54 | 53 | ||
| 55 | def _PrintCommonCommands(self): | 54 | def _PrintCommonCommands(self): |
| 56 | print('usage: repo COMMAND [ARGS]') | 55 | print('usage: repo COMMAND [ARGS]') |
| 57 | print('The most commonly used repo commands are:') | 56 | print('The most commonly used repo commands are:') |
| 58 | commandNames = [name | 57 | commandNames = list(sorted([name |
| 59 | for name in self.commands.keys() | 58 | for name, command in self.commands.items() |
| 60 | if self.commands[name].common] | 59 | if command.common])) |
| 61 | commandNames.sort() | ||
| 62 | 60 | ||
| 63 | maxlen = 0 | 61 | maxlen = 0 |
| 64 | for name in commandNames: | 62 | for name in commandNames: |
