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