]> git.ipfire.org Git - thirdparty/systemd.git/blame - shell-completion/zsh/_busctl
Merge pull request #11827 from keszybz/pkgconfig-variables
[thirdparty/systemd.git] / shell-completion / zsh / _busctl
CommitLineData
86cb0691 1#compdef busctl
7059062c 2# SPDX-License-Identifier: LGPL-2.1+
86cb0691 3
8cd095cc 4# busctl(1) completion -*- shell-script -*-
86cb0691
ZJS
5#
6# This file is part of systemd.
7#
86cb0691
ZJS
8# systemd is free software; you can redistribute it and/or modify it
9# under the terms of the GNU Lesser General Public License as published by
10# the Free Software Foundation; either version 2.1 of the License, or
11# (at your option) any later version.
12#
13# systemd is distributed in the hope that it will be useful, but
14# WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16# General Public License for more details.
17#
18# You should have received a copy of the GNU Lesser General Public License
19# along with systemd; If not, see <http://www.gnu.org/licenses/>.
20
c501ecd7 21(( $+functions[_busctl_commands] )) || _busctl_commands()
86cb0691
ZJS
22{
23 local -a _busctl_cmds
24 _busctl_cmds=(
25 "list:List bus names"
cade10cc 26 "status:Show bus service, process or bus owner credentials"
86cb0691 27 "monitor:Show bus traffic"
cade10cc
NC
28 "capture:Capture bus traffix as pcap"
29 "tree:Show object tree of service"
30 "introspect:Introspect object"
31 "call:Call a method"
32 "get-property:Get property value"
33 "set-property:Set property value"
86cb0691
ZJS
34 )
35 if (( CURRENT == 1 )); then
36 _describe -t commands 'busctl command' _busctl_cmds || compadd "$@"
37 else
38 local curcontext="$curcontext"
39 cmd="${${_busctl_cmds[(r)$words[1]:*]%%:*}}"
40 if (( $+functions[_busctl_$cmd] )); then
41 _busctl_$cmd
42 else
43 _message "no more options"
44 fi
45 fi
46}
47
48_arguments \
49 {-h,--help}'[Prints a short help text and exits.]' \
50 '--version[Prints a short version string and exits.]' \
51 '--no-pager[Do not pipe output into a pager]' \
4433c995 52 '--no-legend[Do not show the headers and footers]' \
86cb0691
ZJS
53 '--system[Connect to system manager]' \
54 '--user[Connect to user service manager]' \
55 {-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \
56 {-M+,--machine=}'[Operate on local container]:machines:_sd_machines' \
57 '--address=[Connect to the bus specified by address]:address' \
4433c995
DM
58 '--show-machine[Show machine ID column in list]' \
59 '--unique[Only show unique names]' \
60 '--acquired[Only show acquired names]' \
61 '--activatable[Only show activatable names]' \
86cb0691 62 '--match=[Only show matching messages]:match' \
cade10cc
NC
63 '--list[Do not show tree, but simple object path list]' \
64 '--quiet[Do not show method call reply]'\
65 '--verbose[Show result values in long format]' \
66 '--expect-reply=[Expect a method call reply]:boolean:(1 0)' \
67 '--auto-start=[Auto-start destination service]:boolean:(1 0)' \
68 '--allow-interactive-authorization=[Allow interactive authorization for operation]:boolean:(1 0)' \
69 '--timeout=[Maximum time to wait for method call completion]:timeout (seconds)' \
70 '--augment-creds=[Extend credential data with data read from /proc/$PID]:boolean:(1 0)' \
c501ecd7 71 '*::busctl command:_busctl_commands'