2011-04-21 11:15:01 +03:00

23 lines
479 B
Bash

# Qt qdbus, dcop completion
have qdbus || have dcop || return
_qdbus()
{
local cur prev words cword
_init_completion || return
[ -n "$cur" ] && unset words[${#words[@]}-1]
COMPREPLY=( $( compgen -W '$( command ${words[@]} 2>/dev/null | \
sed s/\(.*\)// )' -- "$cur" ) )
} &&
complete -F _qdbus qdbus dcop
# 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