git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] completion: remove ancient "ensure colon in COMP_WORDBREAKS" workaround

From
SZEDER Gábor <szeder@ira.uka.de>
Date
Jun 9, 2013, 23:59 UTC
Message-ID
<1370822361-15637-1-git-send-email-szeder@ira.uka.de>

Fedore 9 shipped the gvfs package with a buggy Bash completion script: it removed the ':' character from COMP_WORDBREAKS, thereby breaking certain features of git's completion script. We worked this around in db8a9ff0 (bash completion: Resolve git show ref:path<tab> losing ref: portion, 2008-07-15).

The bug was fixed in Fedora 10 and Fedora 9 reached its EOL on 2009-07-10, almost four years ago. It's about time to remove our workaround.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
---
 contrib/completion/git-completion.bash | 14 --------------
 1 file changed, 14 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 91234d47..2f78dcfa 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -24,11 +24,6 @@
 #    3) Consider changing your PS1 to also show the current branch,
 #       see git-prompt.sh for details.
 
-case "$COMP_WORDBREAKS" in
-*:*) : great ;;
-*)   COMP_WORDBREAKS="$COMP_WORDBREAKS:"
-esac
-
 # __gitdir accepts 0 or 1 arguments (i.e., location)
 # returns location of .git repo
 __gitdir ()
@@ -458,11 +453,6 @@ __git_complete_revlist_file ()
 			;;
 		esac
 
-		case "$COMP_WORDBREAKS" in
-		*:*) : great ;;
-		*)   pfx="$ref:$pfx" ;;
-		esac
-
 		__gitcomp_nl "$(git --git-dir="$(__gitdir)" ls-tree "$ls" 2>/dev/null \
 				| sed '/^100... blob /{
 				           s,^.*	,,
@@ -560,10 +550,6 @@ __git_complete_remote_or_refspec ()
 	[ "$remote" = "." ] && remote=
 	case "$cur_" in
 	*:*)
-		case "$COMP_WORDBREAKS" in
-		*:*) : great ;;
-		*)   pfx="${cur_%%:*}:" ;;
-		esac
 		cur_="${cur_#*:}"
 		lhs=0
 		;;
-- 
1.8.0.269.g97125f4
Next: Jonathan Nieder
Message 1 of 5 in “completion: remove ancient "ensure colon in COMP_WORDBREAKS" workaround”
  1. completion: remove ancient "ensure colon in COMP_WORDBREAKS" workaroundSZEDER Gábor, Jun 9, 2013
  2. Jonathan NiederJun 10, 2013
  3. SZEDER GáborJun 10, 2013
  4. Junio C HamanoJun 10, 2013
  5. Eric SunshineJun 10, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.