mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-03 10:21:46 +02:00
github #41: Extend _dbus with dbus-launch completion
This commit is contained in:
parent
248ae0b77e
commit
2c94b597bd
2 changed files with 25 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
||||||
2019-10-29 Oliver Kiddle <okiddle@yahoo.co.uk>
|
2019-10-29 Oliver Kiddle <okiddle@yahoo.co.uk>
|
||||||
|
|
||||||
|
* github #41: Sebastian: Extend _dbus with dbus-launch completion
|
||||||
|
|
||||||
* unposted: Completion/Unix/Command/_zfs: tweak to check for
|
* unposted: Completion/Unix/Command/_zfs: tweak to check for
|
||||||
openzfs rather than Solaris
|
openzfs rather than Solaris
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#compdef dbus-send dbus-monitor
|
#compdef dbus-send dbus-monitor dbus-launch
|
||||||
|
|
||||||
local curcontext="$curcontext" state line expl find end ret=1
|
local curcontext="$curcontext" state line expl find end ret=1
|
||||||
typeset -A opt_args
|
typeset -A opt_args
|
||||||
|
@ -27,6 +27,20 @@ case $service in
|
||||||
- '(format)' \
|
- '(format)' \
|
||||||
--monitor --profile --pcap --binary && ret=0
|
--monitor --profile --pcap --binary && ret=0
|
||||||
;;
|
;;
|
||||||
|
dbus-launch)
|
||||||
|
_arguments -C \
|
||||||
|
--version"[print the version of dbus-launch]" \
|
||||||
|
--help"[print the help info of dbus-launch]" \
|
||||||
|
--sh-syntax"[emit bourne-shell compatible code to set up environment variables]" \
|
||||||
|
--csh-syntax"[emit csh compatible code to set up environment variables]" \
|
||||||
|
--auto-syntax"[choose --csh-syntax or --sh-syntax based on the SHELL environment variable]" \
|
||||||
|
--binary-syntax"[use a nul-terminated syntax with the environment data]" \
|
||||||
|
--close-stderr"[close stderr stream before starting the d-bus daemon]" \
|
||||||
|
--exit-with-session"[create a persistent \"babysitter\" process]" \
|
||||||
|
--exit-with-x11"[create a persistent \"babysitter\" process that will connect to the x server]" \
|
||||||
|
--autolaunch="[scan for a previously-started session and reuse the values found there]:machine id:->machine-id" \
|
||||||
|
--config-file="[pass --config-file=FILENAME to the bus daemon]" && ret=0
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case $state in
|
case $state in
|
||||||
|
@ -85,6 +99,14 @@ case $state in
|
||||||
'arg0namespace:namespace' \
|
'arg0namespace:namespace' \
|
||||||
'eavesdrop:eavesdropping:(true false)' && ret=0
|
'eavesdrop:eavesdropping:(true false)' && ret=0
|
||||||
;;
|
;;
|
||||||
|
machine-id)
|
||||||
|
{ local machine_id="$(</var/lib/dbus/machine-id)" } 2>/dev/null
|
||||||
|
if [[ -n "$machine_id" ]]; then
|
||||||
|
_wanted machine-ids expl machine-id compadd $machine_id && ret=0
|
||||||
|
else
|
||||||
|
_message "No /var/lib/dbus/machine-id found" && ret=0
|
||||||
|
fi
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
Loading…
Reference in a new issue