git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bash completion in backticks partially broken
@ 2006-11-05  9:05 Shawn Pearce
  2006-11-05  9:48 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Shawn Pearce @ 2006-11-05  9:05 UTC (permalink / raw)
  To: git

So an annoying feature of bash appears to be that it won't really
provide completion on backtick'd commands.

For example I can complete "git merge-base ma" just fine as is, but
if I toss it into backticks say "git update-ref M `git merge-base ma"
then I can't complete "ma" out to "master" anymore.

A little bit of debugging appears to show that bash is invoking the
completion hook for the outermost command; that is we are looking
for parameters for update-ref and not merge-base.

I think I could rewrite a good part of git-completion.bash to
support this use.  But it won't work for "echo `git merge-base ma"
as the outermost command is echo and we don't have a Git completion
hook registered for that command.

This is really annoying when it comes to less contrived examples.
I find myself forming odd pipelines with commit-tree, update-ref,
mktree, lstree, sed, rev-list, etc. and always keep bumping up on
the limitations of git-completion.bash.

Any suggestions?  How often do bash users try to use backticks to
call Git commands, only to find bash isn't being as helpful as it
should be?

-- 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-11-05 10:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-05  9:05 bash completion in backticks partially broken Shawn Pearce
2006-11-05  9:48 ` Junio C Hamano
2006-11-05 10:26   ` Shawn Pearce

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).