Thread (32 messages) flat view 32 messages, 3 authors, 2020-11-25
STALE2114d

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

From: Felipe Contreras <hidden>
Date: 2020-11-10 21:22:02
Subsystem: the rest · Maintainer: Linus Torvalds

This way we can reorganize the rest of the function.

Signed-off-by: Felipe Contreras <redacted>
---
 contrib/completion/git-completion.bash | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
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
-- 
2.29.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help