#compdef herbstclient
# zsh completion for herbstclient

# add this to your zshrc before sourcing this
#autoload -U compinit
#compinit

_herbstclient() {
    local IFS=$'\n'
    # compadd is documented in zshcompwid(1)
    compadd -QS '' "$@" $(herbstclient -q complete_shell "$((CURRENT-2))" "${(@)words[@]:1}")
}

# compdef is documented in zshcompsys(1)
compdef _herbstclient herbstclient
