completions: fix qdbus property completion

This commit is contained in:
Rocka 2022-10-21 12:19:04 +08:00 committed by Fabian Boehm
parent ad55a55734
commit f3372635fa

View file

@ -11,7 +11,7 @@ function __fish_qdbus_complete
set argc (count $argv)
if test $argc -le 3
# avoid completion of property value
qdbus $qdbus_flags $argv[2] $argv[3] | string replace --regex '^(property(\ read)?|signal|method) ((\{.+\})|([^\ ]+)) ([^\(]+)(\(.+?\))?' '$6\t$1 $3 $7' | string trim
qdbus $qdbus_flags $argv[2] $argv[3] | string replace --regex '^(?<kind>property\ (read)?(write)?|signal|method) (?<type>(\{.+\})|([^\ ]+)) (?<name>[^\(]+)(?<arguments>\(.+?\))?' '$name\t$kind $type $arguments' | string trim
end
end