summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRick Harris <rconradharris@gmail.com>2011-11-19 18:14:10 -0600
committerRick Harris <rconradharris@gmail.com>2011-11-21 21:51:53 +0000
commit58af45c9471107ce54cea5fe5d4ca7cc0bff56fa (patch)
treeda9e6af525416da5b46891db4f6dff7bf17757a2 /tools
parent0e1e38d2e43fddb90b8010bd3e43b3da641cf643 (diff)
downloadpython-novaclient-58af45c9471107ce54cea5fe5d4ca7cc0bff56fa.tar.gz
Adding UUID cache for bash autocompletion.
Change-Id: I3d8abea8d99c406f237b8e500e1decf8d24f22d9
Diffstat (limited to 'tools')
-rw-r--r--tools/nova.bash_completion4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/nova.bash_completion b/tools/nova.bash_completion
index ab1579fc..0bcd0afd 100644
--- a/tools/nova.bash_completion
+++ b/tools/nova.bash_completion
@@ -13,6 +13,10 @@ _nova()
zone zone-add zone-boot zone-delete zone-info zone-list help
--debug --endpoint_name --password --projectid --region_name --url
--username --version"
+
+ UUID_CACHE=~/.novaclient_cached_*_uuids
+ opts+=" "$(cat $UUID_CACHE 2> /dev/null | tr '\n' ' ')
+
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
}
complete -F _nova nova