3 [ -z "$BASH_VERSION" ] && return
5 ####################################################################################################
10 case "${COMP_CWORD}" in
12 choices=$'help \nlist-schemas\nlist-relocatable-schemas\nlist-keys \nlist-children \nget \nrange \nset \nreset \nwritable \nmonitor'
16 case "${COMP_WORDS[1]}" in
18 choices=$'list-schemas\nlist-relocatable-schemas\nlist-keys\nlist-children\nget\nrange\nset\nreset\nwritable\nmonitor'
20 list-keys|list-children)
21 choices="$(gsettings list-schemas)"$'\n'"$(gsettings list-relocatable-schemas | sed -e 's.$.:/.')"
24 get|range|set|reset|writable|monitor)
25 choices="$(gsettings list-schemas | sed -e 's.$. .')"$'\n'"$(gsettings list-relocatable-schemas | sed -e 's.$.:/.')"
31 case "${COMP_WORDS[1]}" in
33 choices="$(gsettings list-keys ${COMP_WORDS[2]} 2> /dev/null | sed -e 's.$. .')"
36 get|range|reset|writable|monitor)
37 choices="$(gsettings list-keys ${COMP_WORDS[2]} 2> /dev/null)"
44 COMPREPLY=($(compgen -W "${choices}" "${COMP_WORDS[$COMP_CWORD]}"))
47 ####################################################################################################
49 complete -o nospace -F __gsettings gsettings