Add some more cases to the app-id unit tests
[glib.git] / gio / completion / gdbus
blob79f4cb4b426ca798e6ee70be1344919dab633ca9
2 # Check for bash
3 [ -z "$BASH_VERSION" ] && return
5 ####################################################################################################
8 __gdbus() {
9     local IFS=$'\n'
10     local cur=`_get_cword :`
12     local suggestions=$(gdbus complete "${COMP_LINE}" ${COMP_POINT})
13     COMPREPLY=($(compgen -W "$suggestions" -- "$cur"))
15     # Remove colon-word prefix from COMPREPLY items
16     case "$cur" in
17         *:*)
18             case "$COMP_WORDBREAKS" in
19                 *:*)
20                     local colon_word=${cur%${cur##*:}}
21                     local i=${#COMPREPLY[*]}
22                     while [ $((--i)) -ge 0 ]; do
23                         COMPREPLY[$i]=${COMPREPLY[$i]#"$colon_word"}
24                     done
25                     ;;
26             esac
27             ;;
28     esac
31 ####################################################################################################
33 complete -o nospace -F __gdbus gdbus