feat(scw): use official scw completion

This commit is contained in:
Florian Rey 2024-10-14 08:57:37 +02:00
commit b9378d04b5
No known key found for this signature in database
3 changed files with 20 additions and 337 deletions

View file

@ -0,0 +1,14 @@
if (( ! $+commands[scw] )); then
return
fi
_scw () {
output=($(scw autocomplete complete zsh -- ${CURRENT} ${words}))
opts=('-S' ' ')
if [[ $output == *= ]]; then
opts=('-S' '')
fi
compadd "${opts[@]}" -- "${output[@]}"
}
compdef _scw scw