9 lines
355 B
Bash
9 lines
355 B
Bash
# 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 | cut -f1)" \
|
|
-- "${COMP_WORDS[COMP_CWORD]}")
|
|
}
|
|
complete -F _proxy_ctl proxy-ctl
|