2014-04-12 21:59:41 +00:00
|
|
|
#! /bin/bash
|
|
|
|
|
|
|
|
_cli_bash_autocomplete() {
|
|
|
|
local cur prev opts base
|
|
|
|
COMPREPLY=()
|
|
|
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
|
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
2014-06-18 15:59:07 +00:00
|
|
|
opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion )
|
2014-04-12 21:59:41 +00:00
|
|
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
complete -F _cli_bash_autocomplete $PROG
|