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

[PATCH 0/3] improve bash completion of fetch, pull, and push

From
Jay Soffian <jaysoffian@gmail.com>
Date
Mar 6, 2009, 04:39 UTC
Message-ID
<cover.1236314073.git.jaysoffian@gmail.com>
On Thu, Mar 5, 2009 at 6:15 PM, Markus Heidelberg <markus.heidelberg@web.de> wrote:
Show 18 quoted lines
> Sverre Rabbelier, 05.03.2009:
>> Heya,
>>
>> Observe:
>> $ git push ori<tab>
>>   git push origin
>>
>> $ git push -f ori<tab>
>>   git push -f origin/
>>
>> Something weird going on there, or is this intentional and am I
>> missing something?
>
> Something similar happens with fetch and pull. They only complete the
> remote name, when exactly 2 words are existing on the command line
> ("git" and the subcommand) by: if [ "$COMP_CWORD" = 2 ]
>
> Doesn't seem right.

This series is intended to fix the original issue, as well as provide --option completion for all three commands. And, I made a clean spot, so I had to clean up a couple other things.

Jay Soffian (3):
  bash completion: fix completion issues with fetch, pull, and push
  bash completion: refactor --strategy completion
  bash completion: teach fetch, pull, and push to complete their
    options
 contrib/completion/git-completion.bash |  197 +++++++++++++++++++++-----------
 1 files changed, 130 insertions(+), 67 deletions(-)
Next: Jay Soffian
Message 1 of 14 in “improve bash completion of fetch, pull, and push”
  1. 0/3 improve bash completion of fetch, pull, and pushJay Soffian, Mar 6, 2009
  2. 1/3 bash completion: fix completion issues with fetch, pull, and pushJay Soffian, Mar 6, 2009
  3. Shawn O. PearceMar 6, 2009
  4. Nanako ShiraishiMar 11, 2009
  5. Jay SoffianMar 11, 2009
  6. 2/3 bash completion: refactor --strategy completionJay Soffian, Mar 6, 2009
  7. Shawn O. PearceMar 6, 2009
  8. Jay SoffianMar 6, 2009
  9. Shawn O. PearceMar 6, 2009
  10. Jay SoffianMar 6, 2009
  11. Shawn O. PearceMar 6, 2009
  12. 3/3 bash completion: teach fetch, pull, and push to complete their optionsJay Soffian, Mar 6, 2009
  13. Shawn O. PearceMar 6, 2009
  14. Sverre RabbelierMar 6, 2009

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.