summaryrefslogtreecommitdiff
path: root/contrib/qdbus
blob: 1e70c708a57f5f56c641764984137858f7753c08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Qt qdbus completion

have qdbus &&
_qdbus()
{
    local cur compstr

    COMPREPLY=()
    cur=`_get_cword`
    if [ -z "$cur" ]; then
        compstr=${COMP_WORDS[*]}
    else
        compstr=$( command echo ${COMP_WORDS[*]} | sed "s/ ${cur/\//\\/}$//" )
    fi
        COMPREPLY=( $( compgen -W '$( command $compstr | sed s/\(.*\)// )' \
            -- "$cur" ) )
} &&
complete -F _qdbus qdbus

# Local variables:
# mode: shell-script
# sh-basic-offset: 4
# sh-indent-comment: t
# indent-tabs-mode: nil
# End:
# ex: ts=4 sw=4 et filetype=sh