feat(scw): use official scw completion (#12755)

This commit is contained in:
nervo 2024-10-16 20:57:04 +02:00 committed by GitHub
commit 9ae155336f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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