Merge "add nova-manage bash completion script"
This commit is contained in:
@@ -1692,6 +1692,18 @@ def main():
|
||||
print "\t%s" % k
|
||||
sys.exit(2)
|
||||
category = argv.pop(0)
|
||||
if category == "bash-completion":
|
||||
if len(argv) < 1:
|
||||
print " ".join([k for (k, v) in CATEGORIES])
|
||||
else:
|
||||
query_category = argv.pop(0)
|
||||
matches = lazy_match(query_category, CATEGORIES)
|
||||
# instantiate the command group object
|
||||
category, fn = matches[0]
|
||||
command_object = fn()
|
||||
actions = methods_of(command_object)
|
||||
print " ".join([k for (k, v) in actions])
|
||||
sys.exit(0)
|
||||
matches = lazy_match(category, CATEGORIES)
|
||||
# instantiate the command group object
|
||||
category, fn = matches[0]
|
||||
|
||||
Reference in New Issue
Block a user