1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-10-26 07:05:04 +08:00

feat(opencode): add completion and opc aliases (#14082)

This commit is contained in:
Robby Russell
2026-10-13 01:40:23 -07:00
committed by GitHub
parent cbf4a572ef
commit 1e3960e6f9
3 changed files with 130 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
#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