severity 708017 minor
retitle 708017 git-completion.bash: confusing behavior when typing paths in
place of revs
tags 708017 + upstream
quit
Hi Helge,
Kreutzmann wrote:
> However, typing "git log de<TAB>" produces:
> #git log debian/1.
> and typing <TAB> twice produces:
> debian/1.4.4-7+squeeze3 debian/1.5.3-2.11.1 debian/1.5.3-2.14
> debian/1.5.3-2.9 debian/1.6.1-2 debian/1.6.2-4
> debian/1.6.2-7
> debian/1.5.3-2.10 debian/1.5.3-2.12 debian/1.5.3-2.15
> debian/1.5.3-5 debian/1.6.1-3 debian/1.6.2-5
> debian/1.5.3-2.11 debian/1.5.3-2.13 debian/1.5.3-2.16
> debian/1.6.1-1 debian/1.6.2-1 debian/1.6.2-6
Sorry for the slow reply. The syntax of the "git log" command is
git log <revisions> [--] <paths>
The bash completion script therefore assumes what you are typing
as an argument to "git log" is a revision. To complete on paths,
you can do
git log -- de<TAB>
I'm not sure what the best way to make this more intuitive would be.
Should the completion script get a manpage? Should commands like this
complete on revs intermixed with paths, with the confusion (git errors
out for revisions after paths) and performance penalty that entails?
Ideas welcome.
Thanks,
Jonathan
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]