Skip to content

improve bash completion of fetch, pull, and push

Jay Soffian git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3bash completion: fix completion issues with fetch, pull, and pushcontrib/completion/git-completion.bash+60 -493 replies
2/3bash completion: refactor --strategy completioncontrib/completion/git-completion.bash+19 -185 replies
3/3bash completion: teach fetch, pull, and push to complete their optionscontrib/completion/git-completion.bash+56 -51 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchShawn O. Pearce
1/3A-b
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] improve bash completion of fetch, pull, and push
Quoted 10 lines · Markus Heidelberg

Sverre Rabbelier, 05.03.2009:

Quoted 9 lines

Heya,

Observe:

$ git push ori<tab>
  git push origin
$ git push -f ori<tab>
  git push -f origin/
Quoted 8 lines
Quoted 2 lines

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(-)