Debian Codegraph @

autocomplete/bash_autocomplete

raw symbols SCIP
1 #! /bin/bash
2
3 : ${PROG:=$(basename ${BASH_SOURCE})}
4
5 _cli_bash_autocomplete() {
6 local cur opts base
7 COMPREPLY=()
8 cur="${COMP_WORDS[COMP_CWORD]}"
9 opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion )
10 if [ -n "${opts}" ];
11 then
12 COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
13 else
14 _filedir
15 fi
16 return 0
17 }
18
19 complete -F _cli_bash_autocomplete $PROG
20
21 unset PROG