#compdef wmiremote local expl _wmi_actions() { local a a=( $(grep '^\\fB' /usr/local/man/man5/actions.conf.5 | grep -v conf | sed -e 's/:.*//' -e 's/^\\fB//') ) _wanted wmi-actions expl 'wmi actions' compadd "$@" -a - a } _arguments \ '-a[invokes an WMI action remotely]:wmi actions:_wmi_actions' \ '-d[display specifies the display to use]:display:_x_display' \ '-m[sets meters info (see manual page for details)]' \ '-p[prints current key bindings of running WMI]' \ '-t[displays bartext in the wmi]' \ '-v[prints out above version info]' \