Skip to content

Commit 3c62ce2

Browse files
delete bash_completion in subcommand
There are two "completion" in the subcommand table: bash-completion and bash_completion. but "bash_completion" is not in help information and it is repeated with "bash-completion", so delete it. Change-Id: I5f3bc918a1ce5b6283cc865db4383f128b138d5e Closes-Bug: #1670123
1 parent 6fcc675 commit 3c62ce2

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

ceilometerclient/shell.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -117,19 +117,9 @@ def get_subcommand_parser(self, version):
117117
version, 'shell')
118118
self._find_actions(subparsers, submodule)
119119
self._find_actions(subparsers, self)
120-
self._add_bash_completion_subparser(subparsers)
121120

122121
return parser
123122

124-
def _add_bash_completion_subparser(self, subparsers):
125-
subparser = subparsers.add_parser(
126-
'bash_completion',
127-
add_help=False,
128-
formatter_class=HelpFormatter
129-
)
130-
self.subcommands['bash_completion'] = subparser
131-
subparser.set_defaults(func=self.do_bash_completion)
132-
133123
def _find_actions(self, subparsers, actions_module):
134124
for attr in (a for a in dir(actions_module) if a.startswith('do_')):
135125
# I prefer to be hypen-separated instead of underscores.
@@ -243,7 +233,6 @@ def do_bash_completion(self, args):
243233
options.add(option)
244234

245235
commands.remove('bash-completion')
246-
commands.remove('bash_completion')
247236
print(' '.join(commands | options))
248237

249238
@utils.arg('command', metavar='<subcommand>', nargs='?',

0 commit comments

Comments
 (0)