mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-12 01:52:31 +01:00
feat(scw): use official scw completion (#12755)
This commit is contained in:
parent
09a9467200
commit
9ae155336f
3 changed files with 20 additions and 337 deletions
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue