]> git.ipfire.org Git - thirdparty/systemd.git/blame - shell-completion/zsh/_sd_machines
Merge pull request #11827 from keszybz/pkgconfig-variables
[thirdparty/systemd.git] / shell-completion / zsh / _sd_machines
CommitLineData
c0fd7cbd 1#autoload
7059062c 2# SPDX-License-Identifier: LGPL-2.1+
c501ecd7 3
4(( $+functions[__sd_machines_get_machines] )) ||
5__sd_machines_get_machines () {
3a450ec5 6 machinectl --full --no-legend --no-pager list | {while read -r a b; do echo $a; done;};
c0fd7cbd
WG
7}
8
9local -a _machines
c501ecd7 10_machines=("${(fo)$(__sd_machines_get_machines)}")
c0fd7cbd
WG
11typeset -U _machines
12if [[ -n "$_machines" ]]; then
13 _describe 'machines' _machines
14else
15 _message 'no machines'
16fi