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