fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
33a9659cd
master
1function __fish_qdbus_complete 2argparse system'bus=' literal help --( commandline --cut-at-cursor --tokens-expanded) 2> /dev/null 3or return 4if set -q _flag_help 5return 6end 7set -l qdbus_flags$_flag_system 8if set -q _flag_bus 9set -a qdbus_flags --bus$_flag_bus 10end 11set argc( count $argv ) 12if test $argc -le 3 13# avoid completion of property value 14qdbus $qdbus_flags $argv [ 2 ] $argv [ 3 ] | string replace --regex'^(?<kind>property\ (read)?(write)?|signal|method( Q_NOREPLY)?) (?<type>(\{.+\})|([^\ ]+)) (?<name>[^\(]+)(?<arguments>\(.+?\))?' '$name\t$kind $type $arguments' | string trim 15end 16end 17 18complete -c qdbus -f 19 20complete -c qdbus -l system -d'connect to the system bus' 21complete -c qdbus -l bus -r -d'connect to a custom bus' 22complete -c qdbus -l literal -d'print replies literally' 23complete -c qdbus -l help -d'print usage' 24 25complete -c qdbus -a'(__fish_qdbus_complete)'