feat(opencode): add completion and opc aliases

This commit is contained in:
Robby Russell
2026-09-08 15:42:55 -07:00
parent d217d05374
commit 333e42b5af
3 changed files with 124 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