diff --git a/cmd b/cmd index 3f8f6b7..0b9db9c 100755 --- a/cmd +++ b/cmd @@ -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" "$@"