python-manilaclient/tools/manila.bash_completion

16 lines
361 B
Plaintext
Raw Normal View History

2013-09-05 13:32:38 +03:00
_manila()
2013-09-02 23:42:41 -04:00
{
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
2013-09-05 13:32:38 +03:00
opts="$(manila bash_completion)"
2013-09-02 23:42:41 -04:00
2013-09-03 14:37:34 +03:00
COMPLETION_CACHE=~/.manilaclient/*/*-cache
2013-09-02 23:42:41 -04:00
opts+=" "$(cat $COMPLETION_CACHE 2> /dev/null | tr '\n' ' ')
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
}
2013-09-05 13:32:38 +03:00
complete -F _manila manila