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

This commit is contained in:
nervo
2024-10-16 20:57:04 +02:00
committed by GitHub
parent 09a9467200
commit 9ae155336f
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