File: nova.bash_completion

package info (click to toggle)
python-novaclient 1%3A2012.1-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 700 kB
  • sloc: python: 5,421; sh: 212; makefile: 78
file content (15 lines) | stat: -rw-r--r-- 351 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
_nova()
{
    local cur prev opts
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"

    opts="$(nova bash_completion)"

    COMPLETION_CACHE=~/.novaclient/*/*-cache
    opts+=" "$(cat $COMPLETION_CACHE 2> /dev/null | tr '\n' ' ')

    COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
}
complete -F _nova nova