]> git.ipfire.org Git - thirdparty/systemd.git/blob - shell-completion/zsh/_systemd-inhibit
coredumpctl: add more debug output
[thirdparty/systemd.git] / shell-completion / zsh / _systemd-inhibit
1 #compdef systemd-inhibit
2
3 _systemd_inhibit_command(){
4 if (( CURRENT == 1 )); then
5 compset -q
6 _normal
7 else
8 local n=${words[(b:2:i)[^-]*]}
9 if (( n <= CURRENT )); then
10 compset -n $n
11 _alternative \
12 'files:file:_files' \
13 'commands:command:_normal' && return 0
14 fi
15 _default
16 fi
17 }
18
19 _arguments \
20 {-h,--help}'[Show this help]' \
21 '--version[Show package version]' \
22 '--what=[Operations to inhibit]:options:(shutdown sleep idle handle-power-key handle-suspend-key handle-hibernate-key handle-lid-switch)' \
23 '--who=[A descriptive string who is inhibiting]' \
24 '--why=[A descriptive string why is being inhibited]' \
25 '--mode=[One of block or delay]' \
26 '--list[List active inhibitors]' \
27 '*:commands:_systemd_inhibit_command'