From: Felipe Contreras Date: Fri, 18 Jun 2021 18:25:00 GMT Subject: [PATCH v2 27/45] completion: bash: change suffix check in __gitcomp Message-ID: <20210618182518.697912-28-felipe.contreras@gmail.com> In-Reply-To: <20210618182518.697912-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 --- 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 ebf8df94e8..e7308b212f 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -346,8 +346,8 @@ __gitcomp () fi break fi - c="$c${4-}" if [[ $c == "$cur_"* ]]; then + c="$c${4-}" case $c in *=|*.) ;; *) c="$c " ;; -- 2.32.0