diff mbox series

[v2,10/26] completion: bash: factor out check in __gitcomp

Message ID 20201110212136.870769-11-felipe.contreras@gmail.com (mailing list archive)
State New, archived
Headers show
Series completion: bash: a bunch of fixes, cleanups, and reorganization | expand

Commit Message

Felipe Contreras Nov. 10, 2020, 9:21 p.m. UTC
This way we can reorganize the rest of the function.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 contrib/completion/git-completion.bash | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 15d7490cfd..bb1250f10c 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -321,9 +321,11 @@  __gitcomp ()
 {
 	local cur_="${3-$cur}"
 
+	if [[ "$cur_" == *= ]]; then
+		return
+	fi
+
 	case "$cur_" in
-	*=)
-		;;
 	--no-*)
 		local c i=0 IFS=$' \t\n'
 		for c in $1; do