mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-09-21 18:46:06 +02:00
13 lines
364 B
Plaintext
13 lines
364 B
Plaintext
#compdef opencode
|
|
|
|
# Adapted from `opencode completion`, using the CLI's live Yargs completions.
|
|
local -a reply
|
|
reply=("${(@f)$(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" \
|
|
command opencode --get-yargs-completions "${words[@]}" < /dev/null 2> /dev/null)}")
|
|
|
|
if [[ -n "${reply[1]}" ]]; then
|
|
_describe 'values' reply
|
|
else
|
|
_default
|
|
fi
|