python-manilaclient/tools/manila.bash_completion
Dirk Müller ffe1c2ee10 Rename to manila.bash_completion
Change-Id: I160d7d8a240d68d535aff5793af5e4571c70194f
2014-05-23 00:42:05 +02:00

16 lines
361 B
Plaintext

_manila()
{
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="$(manila bash_completion)"
COMPLETION_CACHE=~/.manilaclient/*/*-cache
opts+=" "$(cat $COMPLETION_CACHE 2> /dev/null | tr '\n' ' ')
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
}
complete -F _manila manila