diff options
| author | nervo <nervo@nervo.net> | 2024-10-16 20:57:04 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-16 20:57:04 +0200 |
| commit | 9ae155336f24dd459c1030b717e11489ababa624 (patch) | |
| tree | 387d53c5d708960d6495467db7ab5f14628ba691 /plugins/scw/scw.plugin.zsh | |
| parent | 09a94672003b21b8a3d8d15d31098641e7f3a4db (diff) | |
| download | zsh-9ae155336f24dd459c1030b717e11489ababa624.tar.gz zsh-9ae155336f24dd459c1030b717e11489ababa624.tar.bz2 zsh-9ae155336f24dd459c1030b717e11489ababa624.zip | |
feat(scw): use official scw completion (#12755)
Diffstat (limited to 'plugins/scw/scw.plugin.zsh')
| -rw-r--r-- | plugins/scw/scw.plugin.zsh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/scw/scw.plugin.zsh b/plugins/scw/scw.plugin.zsh new file mode 100644 index 000000000..cd8ed4ac7 --- /dev/null +++ b/plugins/scw/scw.plugin.zsh @@ -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 |
