X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=shell-completion%2Fzsh%2F_systemd-inhibit;h=1ecb6dc7ee9a22a9d99fb94e42b3bc74a39ff763;hp=7953455d40ac7fda377564ff120c9d5fc0c17650;hb=0eb3cc88504b5d8f740764047ac5162b67992386;hpb=67e654f83021a1b3ed55f4b75936d03591bf80c1 diff --git a/shell-completion/zsh/_systemd-inhibit b/shell-completion/zsh/_systemd-inhibit index 7953455d4..1ecb6dc7e 100644 --- a/shell-completion/zsh/_systemd-inhibit +++ b/shell-completion/zsh/_systemd-inhibit @@ -16,10 +16,16 @@ _systemd_inhibit_command(){ fi } +_inhibit_what() { + local _inhibit + _inhibit=(shutdown sleep idle handle-power-key handle-suspend-key handle-hibernate-key handle-lid-switch) + _values -s : "${_inhibit[@]}" +} + _arguments \ {-h,--help}'[Show this help]' \ '--version[Show package version]' \ - '--what=[Operations to inhibit]:options:(shutdown sleep idle handle-power-key handle-suspend-key handle-hibernate-key handle-lid-switch)' \ + '--what=[Operations to inhibit]:options:_inhibit_what' \ '--who=[A descriptive string who is inhibiting]' \ '--why=[A descriptive string why is being inhibited]' \ '--mode=[One of block or delay]' \