1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00

shell-completion/zsh: rename helper for clarity

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-10-20 09:45:24 +02:00
parent 4e9183059a
commit 9e7cc6f0d2

View File

@ -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