scw.plugin.zsh 257 B

1234567891011121314
  1. if (( ! $+commands[scw] )); then
  2. return
  3. fi
  4. _scw () {
  5. output=($(scw autocomplete complete zsh -- ${CURRENT} ${words}))
  6. opts=('-S' ' ')
  7. if [[ $output == *= ]]; then
  8. opts=('-S' '')
  9. fi
  10. compadd "${opts[@]}" -- "${output[@]}"
  11. }
  12. compdef _scw scw