summaryrefslogtreecommitdiffstats
path: root/shell-completion/zsh
diff options
context:
space:
mode:
authorRonan Pigott <ronan@rjp.ie>2024-09-26 03:42:59 +0200
committerRonan Pigott <ronan@rjp.ie>2024-10-13 04:30:56 +0200
commit30465af656a10c124e7fa9fb33f7ad8454e9af2e (patch)
treeb9a0bc4cb9f06b767aa557b1061b31bfc78fab97 /shell-completion/zsh
parentMerge pull request #34675 from poettering/dupfd-query (diff)
downloadsystemd-30465af656a10c124e7fa9fb33f7ad8454e9af2e.tar.xz
systemd-30465af656a10c124e7fa9fb33f7ad8454e9af2e.zip
busctl: add wait verb to wait for signals
It's like busctl call, but it waits for a signal rather than a reply to a method call.
Diffstat (limited to 'shell-completion/zsh')
-rw-r--r--shell-completion/zsh/_busctl26
1 files changed, 26 insertions, 0 deletions
diff --git a/shell-completion/zsh/_busctl b/shell-completion/zsh/_busctl
index 0018cf6622..5e16d0f1a1 100644
--- a/shell-completion/zsh/_busctl
+++ b/shell-completion/zsh/_busctl
@@ -29,6 +29,7 @@
"tree:Show object tree of service"
"introspect:Introspect object"
"call:Call a method"
+ "wait:Wait for a signal"
"get-property:Get property value"
"set-property:Set property value"
)
@@ -201,6 +202,31 @@ __dbus_matchspec() {
esac
}
+(( $+functions[_busctl_wait] )) || _busctl_wait()
+{
+ local expl
+ case $CURRENT in
+ 2)
+ _wanted busname expl 'busname' \
+ compadd "$@" - $(_busctl_get_service_names)
+ ;;
+ 3)
+ _wanted path expl 'path' \
+ compadd "$@" - $(_busctl_get_objects $words[2])
+ ;;
+ 4)
+ _wanted interface expl 'interface' \
+ compadd "$@" - $(_busctl_get_interfaces $words[2,3])
+ ;;
+ 5)
+ _wanted method expl 'method' \
+ compadd "$@" - $(_busctl_get_members $words[2,4] "signal")
+ ;;
+ *)
+ _message "no more options"
+ esac
+}
+
(( $+functions[_busctl_get-property] )) || _busctl_get-property()
{
local expl