From: Zbigniew Jędrzejewski-Szmek Date: Thu, 20 Oct 2022 07:45:24 +0000 (+0200) Subject: shell-completion/zsh: rename helper for clarity X-Git-Tag: v252-rc3~16^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F25077%2Fhead;p=thirdparty%2Fsystemd.git shell-completion/zsh: rename helper for clarity --- diff --git a/shell-completion/zsh/_machinectl b/shell-completion/zsh/_machinectl index 4b4d044ec83..2b675bd77e2 100644 --- a/shell-completion/zsh/_machinectl +++ b/shell-completion/zsh/_machinectl @@ -1,15 +1,15 @@ #compdef machinectl # SPDX-License-Identifier: LGPL-2.1-or-later -(( $+functions[__machinectl_get_machines] )) || - __machinectl_get_machines () { +(( $+functions[__machinectl_get_images] )) || + __machinectl_get_images () { machinectl --no-legend list-images | {while read -r a b; do echo $a; done;} } -(( $+functions[_machinectl_machines] )) || - _machinectl_machines() { +(( $+functions[_machinectl_images] )) || + _machinectl_images() { local -a _machines - _machines=("${(fo)$(__machinectl_get_machines)}") + _machines=("${(fo)$(__machinectl_get_images)}") typeset -U _machines if [[ -n "$_machines" ]]; then _describe 'machines' _machines @@ -64,9 +64,9 @@ list*|cancel-transfer|pull-tar|pull-raw) msg="no options" ;; clone) - _machinectl_machines ;; + _machinectl_images ;; start) - _machinectl_machines ;; + _machinectl_images ;; *) _sd_machines esac