This commit is contained in:
Koichi Murase 2025-03-18 10:57:22 +08:00 committed by GitHub
commit f357a3cbaa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View file

@ -162,7 +162,7 @@ __%[1]s_handle_go_custom_completion()
else
while IFS='' read -r comp; do
COMPREPLY+=("$comp")
done < <(compgen -W "${out}" -- "$cur")
done <<< "$(compgen -W "${out}" -- "$cur")"
fi
}
@ -183,7 +183,7 @@ __%[1]s_handle_reply()
fi
while IFS='' read -r comp; do
COMPREPLY+=("$comp")
done < <(compgen -W "${allflags[*]}" -- "$cur")
done <<< "$(compgen -W "${allflags[*]}" -- "$cur")"
if [[ $(type -t compopt) = "builtin" ]]; then
[[ "${COMPREPLY[0]}" == *= ]] || compopt +o nospace
fi
@ -244,12 +244,12 @@ __%[1]s_handle_reply()
fi
while IFS='' read -r comp; do
COMPREPLY+=("$comp")
done < <(compgen -W "${completions[*]}" -- "$cur")
done <<< "$(compgen -W "${completions[*]}" -- "$cur")"
if [[ ${#COMPREPLY[@]} -eq 0 && ${#noun_aliases[@]} -gt 0 && ${#must_have_one_noun[@]} -ne 0 ]]; then
while IFS='' read -r comp; do
COMPREPLY+=("$comp")
done < <(compgen -W "${noun_aliases[*]}" -- "$cur")
done <<< "$(compgen -W "${noun_aliases[*]}" -- "$cur")"
fi
if [[ ${#COMPREPLY[@]} -eq 0 ]]; then

View file

@ -352,7 +352,7 @@ __%[1]s_handle_standard_completion_case() {
if ((${#comp}>longest)); then
longest=${#comp}
fi
done < <(printf "%%s\n" "${completions[@]}")
done <<< "$(printf "%%s\n" "${completions[@]}")"
# If there is a single completion left, remove the description text and escape any special characters
if ((${#COMPREPLY[*]} == 1)); then