Move _initialize and _conf_read above completion

This commit is contained in:
rwxrob 2021-12-14 17:42:27 -05:00
parent 39fa88375f
commit 0e70a1b471
No known key found for this signature in database
GPG Key ID: 1CCACEDD2F65578E
1 changed files with 3 additions and 3 deletions

6
cmd
View File

@ -525,6 +525,9 @@ _buffer() {
# --------------------- completion and delegation --------------------
# `complete -C foo foo` > `source <(foo bloated_completion)`
_config_read
_have _initialize && _initialize "$@"
while IFS= read -r line; do
[[ $line =~ ^declare\ -f\ x\. ]] || continue
COMMANDS+=( "${line##declare -f x.}" )
@ -540,9 +543,6 @@ if [[ -n $COMP_LINE ]]; then
exit
fi
_config_read
_have _initialize && _initialize "$@"
for c in "${COMMANDS[@]}"; do
if [[ $c == "$EXE" ]]; then
"x.$EXE" "$@"