chiark / gitweb /
zsh-completion: Move machine listing to autoload
[elogind.git] / shell-completion / zsh / _machinectl
index 2e5e05cfcc25f3be693da0e5556c8ae3b9335c31..026d74fca406933e0947ff8dc9ef1303e5419a9b 100644 (file)
       case $cmd in
         list) msg="no options" ;;
         *)
-          _machines=( "${(foa)$(machinectl list | awk '{print $1}')}" )
-          if [[ -n "$_machines" ]]; then
-            _describe 'machines' _machines
-          else
-            _message 'no machines'
-          fi
+          _sd_machines
       esac
     else
       _message "no more options"