3 [ -z "$BASH_VERSION" ] && return
5 ####################################################################################################
8 local choices coffset section
10 if [ ${COMP_CWORD} -gt 2 ]; then
11 if [ ${COMP_WORDS[1]} = --section ]; then
12 section=${COMP_WORDS[2]}
21 case "$((${COMP_CWORD}-$coffset))" in
23 choices=$'--section \nhelp \nsections \nlist \ndetails \nextract '
27 case "${COMP_WORDS[$(($coffset+1))]}" in
33 choices=$'sections\nlist\ndetails\nextract'
36 sections|list|details|extract)
37 COMPREPLY=($(compgen -f -- ${COMP_WORDS[${COMP_CWORD}]}))
44 case "${COMP_WORDS[$(($coffset+1))]}" in
46 choices="$(gresource list ${COMP_WORDS[$(($coffset+2))]} 2> /dev/null | sed -e 's.$. .')"
53 COMPREPLY=($(compgen -W "${choices}" -- "${COMP_WORDS[${COMP_CWORD}]}"))
56 ####################################################################################################
58 complete -o nospace -F __gresource gresource