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

This commit is contained in:
Robby Russell
2026-10-13 10:40:23 +02:00
committed by GitHub
parent cbf4a572ef
commit 1e3960e6f9
3 changed files with 130 additions and 0 deletions
+12
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