mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-20 07:09:50 +00:00
feat(scw): use official scw completion (#12755)
This commit is contained in:
14
plugins/scw/scw.plugin.zsh
Normal file
14
plugins/scw/scw.plugin.zsh
Normal 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
|
||||
Reference in New Issue
Block a user