2014-04-12 21:59:41 +00:00
|
|
|
#! /bin/bash
|
|
|
|
|
2015-08-29 01:15:08 +00:00
|
|
|
: ${PROG:=$(basename ${BASH_SOURCE})}
|
|
|
|
|
2014-04-12 21:59:41 +00:00
|
|
|
_cli_bash_autocomplete() {
|
2017-04-06 13:11:23 +00:00
|
|
|
local cur opts base
|
|
|
|
COMPREPLY=()
|
|
|
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
|
|
opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion )
|
|
|
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
complete -F _cli_bash_autocomplete $PROG
|
|
|
|
|
|
|
|
unset PROG
|