add _xmake and _xrepo for xmake completion

This commit is contained in:
DavidingPlus 2026-07-02 15:08:45 +08:00
parent 03bae0bf3f
commit 9f7132093b
2 changed files with 12 additions and 0 deletions

6
src/_xmake Normal file
View File

@ -0,0 +1,6 @@
#compdef xmake
_xmake() {
local completions=("${(@f)$(XMAKE_SKIP_HISTORY=1 XMAKE_ROOT=y XMAKE_COLORTERM=nocolor xmake lua private.utils.complete 0 nospace "$words" 2>/dev/null)}")
compadd -Q -S '' -- ${completions[@]}
}

6
src/_xrepo Normal file
View File

@ -0,0 +1,6 @@
#compdef xrepo
_xrepo() {
local completions=("${(@f)$(XMAKE_SKIP_HISTORY=1 XMAKE_ROOT=y XMAKE_COLORTERM=nocolor xmake lua private.xrepo.complete 0 nospace "$words" 2>/dev/null)}")
compadd -Q -S '' -- ${completions[@]}
}