fix: rewrite proxy-ctl to python

This commit is contained in:
fufsob committed 2026-09-14 05:02:14 +00:00
1 parent 006ac60b9a
commit 0af4104fdb
14 files changed
+2243 -1986

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
#compdef proxy-ctl
# proxy-ctl knows its own verbs, tags, profiles and units: ask it.
local -a candidates
candidates=(${(f)"$(proxy-ctl __complete ${(Q)words[2,CURRENT-1]} 2>/dev/null)"})
compadd -a candidates
@@ -0,0 +1,7 @@
# proxy-ctl knows its own verbs, tags, profiles and units: ask it.
_proxy_ctl() {
mapfile -t COMPREPLY < <(
compgen -W "$(proxy-ctl __complete "${COMP_WORDS[@]:1:COMP_CWORD-1}" 2>/dev/null)" \
-- "${COMP_WORDS[COMP_CWORD]}")
}
complete -F _proxy_ctl proxy-ctl
@@ -0,0 +1,2 @@
# proxy-ctl knows its own verbs, tags, profiles and units: ask it.
complete -c proxy-ctl -f -a '(proxy-ctl __complete (commandline -xpc)[2..] 2>/dev/null)'