chiark / gitweb /
loginctl,shell-completions: fix listing of sessions/users/seats
[elogind.git] / shell-completion / zsh / _sd_machines
1 #autoload
2 __get_machines () {
3         machinectl --full --no-pager list | {while read -r a b; do echo $a; done;};
4 }
5
6 local -a _machines
7 _machines=("${(fo)$(__get_machines)}")
8 typeset -U _machines
9 if [[ -n "$_machines" ]]; then
10         _describe 'machines' _machines
11 else
12         _message 'no machines'
13 fi