diff options
author | Felipe Sateler <fsateler@debian.org> | 2019-02-20 21:24:33 -0300 |
---|---|---|
committer | Felipe Sateler <fsateler@debian.org> | 2019-02-20 21:24:33 -0300 |
commit | 7c20daf69c4411979b7f8902f3601d1cdc56cc07 (patch) | |
tree | d59b9989ce55ed23693e80974d94c856f1c2c8b1 /shell-completion/zsh/_systemd-inhibit | |
parent | 6e866b331d7cd4a5e0759dd160dea6edabd3678e (diff) | |
download | systemd-upstream/241.tar.gz |
New upstream version 241upstream/241
Diffstat (limited to 'shell-completion/zsh/_systemd-inhibit')
-rw-r--r-- | shell-completion/zsh/_systemd-inhibit | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/shell-completion/zsh/_systemd-inhibit b/shell-completion/zsh/_systemd-inhibit index 764713e28a..7c40e49ae4 100644 --- a/shell-completion/zsh/_systemd-inhibit +++ b/shell-completion/zsh/_systemd-inhibit @@ -1,7 +1,8 @@ #compdef systemd-inhibit # SPDX-License-Identifier: LGPL-2.1+ -_systemd_inhibit_command(){ +(( $+functions[_systemd-inhibit_commands] )) || +_systemd-inhibit_commands(){ if (( CURRENT == 1 )); then compset -q _normal @@ -17,7 +18,8 @@ _systemd_inhibit_command(){ fi } -_inhibit_what() { +(( $+functions[_systemd-inhibit_what] )) || +_systemd-inhibit_what() { local _inhibit _inhibit=(shutdown sleep idle handle-power-key handle-suspend-key handle-hibernate-key handle-lid-switch) _values -s : "${_inhibit[@]}" @@ -31,4 +33,4 @@ _arguments \ '--why=[A descriptive string why is being inhibited]:reason for the lock:' \ '--mode=[One of block or delay]:lock mode:( block delay )' \ '--list[List active inhibitors]' \ - '*:commands:_systemd_inhibit_command' + '*:commands:_systemd-inhibit_commands' |