[PATCH 31/51] completion: bash: change suffix check in __gitcomp
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Aug 30, 2022, 09:31 UTC
- Message-ID
- <20220830093138.1581538-32-felipe.contreras@gmail.com>
- In-Reply-To
- <20220830093138.1581538-1-felipe.contreras@gmail.com>
We don't match the prefix, we shouldn't match the suffix either.
There are no functional changes since all the callers that add a suffix add an =, and if $cur_ ended with that suffix, we would return immediately.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> --- contrib/completion/git-completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index c9315d4f9a..2ff7de1274 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -351,8 +351,8 @@ __gitcomp () fi break fi - c="$c${4-}" if [[ $c == "$cur_"* ]]; then + c="$c${4-}" case $c in *=|*.) ;; *) c="$c " ;;
-- 2.37.2.351.g9bf691b78c.dirty