diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-01-15 09:23:40 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-01-15 09:23:40 +0000 |
| commit | 8c15ef15ed4c6225be7a8d403a1b5cffd4a0674e (patch) | |
| tree | f6d04ef9d56032971dbac55386775f1ed2bd36b2 /quantumclient/shell.py | |
| parent | 80fe2540e73e59ccefbbf1cbd11619e4f83b6d7b (diff) | |
| parent | a9d5479ecfca3bac939a62b1037adc1497b622be (diff) | |
| download | python-neutronclient-8c15ef15ed4c6225be7a8d403a1b5cffd4a0674e.tar.gz | |
Merge "Make "quantum help" to show a list of subcommands."
Diffstat (limited to 'quantumclient/shell.py')
| -rw-r--r-- | quantumclient/shell.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/quantumclient/shell.py b/quantumclient/shell.py index da36bd0..8008978 100644 --- a/quantumclient/shell.py +++ b/quantumclient/shell.py @@ -332,6 +332,7 @@ class QuantumShell(App): index = 0 command_pos = -1 help_pos = -1 + help_command_pos = -1 for arg in argv: if arg == 'bash-completion': self._bash_completion() @@ -342,9 +343,14 @@ class QuantumShell(App): elif arg in ('-h', '--help'): if help_pos == -1: help_pos = index + elif arg == 'help': + if help_command_pos == -1: + help_command_pos = index index = index + 1 if command_pos > -1 and help_pos > command_pos: argv = ['help', argv[command_pos]] + if help_command_pos > -1 and command_pos == -1: + argv[help_command_pos] = '--help' self.options, remainder = self.parser.parse_known_args(argv) self.configure_logging() self.interactive_mode = not remainder |
