feat: better proxy-ctl completions

This commit is contained in:
fufsob committed 2026-09-14 05:48:36 +00:00
1 parent b8903a094d
commit 85c3e6cfaf
4 files changed
+195 -57

No files matched your search

+2 -1
View File
@@ -1,7 +1,8 @@
# proxy-ctl knows its own verbs, tags, profiles and units: ask it.
# It answers word<TAB>description; bash has no room for the description.
_proxy_ctl() {
mapfile -t COMPREPLY < <(
compgen -W "$(proxy-ctl __complete "${COMP_WORDS[@]:1:COMP_CWORD-1}" 2>/dev/null)" \
compgen -W "$(proxy-ctl __complete "${COMP_WORDS[@]:1:COMP_CWORD-1}" 2>/dev/null | cut -f1)" \
-- "${COMP_WORDS[COMP_CWORD]}")
}
complete -F _proxy_ctl proxy-ctl