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

Re: possible completion bug with --set-upstream-to=

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Dec 30, 2017, 08:28 UTC
Message-ID
<20171230082806.6303-1-szeder.dev@gmail.com>
In-Reply-To
<87bmih83iu.fsf@gmail.com>
Show 7 quoted lines
> Whenever I type the last <TAB> to complete origin/master, as in below:
> 
> > git branch --set-upstream-to=orig<TAB>
> 
> what I get is:
> 
> > git branch origin/master
Yeah, this shouldn't happen. 
> instead of the expected:
> 
> > git branch --set-upstream-to=origin/master
And indeed this is the expected behavior.
> git version and OS:
> 
> >git version 2.1.4
I couldn't reproduce the wrong behavior you saw using v2.1.4 in a
regular setup.
 
However, I could reproduce it after I removed the '=' character from
the set of characters in $COMP_WORDBREAKS, but then all completions
after an '--option=' are affected, e.g. 'pulseaudio --daemonize=t<TAB>
becomes 'pulseaudio true', too.

Could you tell us the content of your $COMP_WORDBREAKS using the output of the following command (to make the included space, tab and newline visible):

  printf "$COMP_WORDBREAKS" |tr ' \t\n' STN ; echo

If it's indeed the case that $COMP_WORDBREAKS is missing the '=', then you should add it back and check whether it fixed the issue. If it did fix it, then you should try to figure out how the '=' got removed from there. Perhaps you used a program that ships its own completion script whose developers changed $COMP_WORDBREAKS to their liking, not knowing about its effect on other completion scripts.

Gábor
Previous: Ernesto AlfonsoNext: Jeff King
Message 2 of 3 in “possible completion bug with --set-upstream-to=”
  1. Ernesto AlfonsoDec 30, 2017
  2. SZEDER GáborDec 30, 2017
  3. Jeff KingDec 30, 2017

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.