completions: fix qdbus Q_NOREPLY method completion

(cherry picked from commit c21e13e62ec4459a3de82e8c021223e7bf0b290c)
This commit is contained in:
Rocka 2023-05-06 16:04:03 +08:00 committed by David Adam
parent b12c36e72d
commit 8319011f24

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 '^(?<kind>property\ (read)?(write)?|signal|method) (?<type>(\{.+\})|([^\ ]+)) (?<name>[^\(]+)(?<arguments>\(.+?\))?' '$name\t$kind $type $arguments' | string trim
qdbus $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
end
end