fix: hardening
This commit is contained in:
168 files changed
+9166
-1644
No files matched your search
@@ -1,8 +1,13 @@
|
||||
# proxy-ctl knows its own verbs, tags, profiles and units: ask it.
|
||||
# It answers word<TAB>description; bash has no room for the description.
|
||||
# Not `compgen -W`: it expands its words, and a tag or list entry is whatever a member of
|
||||
# the userControl groups named a file.
|
||||
_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]}")
|
||||
local cur=${COMP_WORDS[COMP_CWORD]} word
|
||||
COMPREPLY=()
|
||||
while IFS= read -r word; do
|
||||
word=${word%%$'\t'*}
|
||||
[[ $word == "$cur"* ]] && COMPREPLY+=("$word")
|
||||
done < <(proxy-ctl __complete "${COMP_WORDS[@]:1:COMP_CWORD-1}" 2>/dev/null)
|
||||
}
|
||||
complete -F _proxy_ctl proxy-ctl
|
||||
Reference in new issue
Block a user