diff options
Diffstat (limited to 'tools/nova.bash_completion')
-rw-r--r-- | tools/nova.bash_completion | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/nova.bash_completion b/tools/nova.bash_completion new file mode 100644 index 0000000..060bf1f --- /dev/null +++ b/tools/nova.bash_completion @@ -0,0 +1,15 @@ +_cinder() +{ + local cur prev opts + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + + opts="$(cinder bash_completion)" + + COMPLETION_CACHE=~/.cinderclient/*/*-cache + opts+=" "$(cat $COMPLETION_CACHE 2> /dev/null | tr '\n' ' ') + + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) +} +complete -F _cinder cinder |