git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* Completion for aliases that wrap aliases that wrap Git commands
@ 2020-11-06 22:42 Philippe Blain
  2020-11-09 21:56 ` Felipe Contreras
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe Blain @ 2020-11-06 22:42 UTC (permalink / raw)
  To: Git mailing list

Hello all,

I've noticed the following: I have a Git alias that is simply a Git command 
with some options, like

$ git config --get alias.logo
log --abbrev-commit --decorate --format=format:'%C(yellow bold)%h%C(reset) %C(normal)%s%C(reset) %C(dim white)%an%C(reset) %C(dim blue)(%ad)%C(reset) %C(auto)%d%C(reset)'

And another alias that is this previous alias with more options:

$ git config --get alias.lg
logo --first-parent

When typing 'git logo up[TAB][TAB]', the Bash completion script
suggests 'upstream' (like if I type 'git log up[TAB][TAB]'),
but typing 'git lg up[TAB][TAB]' does not suggest anything.

So I'm thinking there is some special logic in the completion script that makes it 
work for simple aliases but not for recursive aliases.

I know nothing about Bash completions, but I'm wondering if that feature would
be possible at all ?

This is on Bash 4.4.19(1) (not that I think it matters very much...)

Cheers,

Philippe.

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

* Re: Completion for aliases that wrap aliases that wrap Git commands
  2020-11-06 22:42 Completion for aliases that wrap aliases that wrap Git commands Philippe Blain
@ 2020-11-09 21:56 ` Felipe Contreras
  2020-11-10  3:01   ` Philippe Blain
  0 siblings, 1 reply; 3+ messages in thread
From: Felipe Contreras @ 2020-11-09 21:56 UTC (permalink / raw)
  To: Philippe Blain; +Cc: Git mailing list

Hello,

On Fri, Nov 6, 2020 at 4:46 PM Philippe Blain
<levraiphilippeblain@gmail.com> wrote:

> I know nothing about Bash completions, but I'm wondering if that feature would
> be possible at all ?

Yeap. I just sent a patch for that:

https://lore.kernel.org/git/20201109215248.461167-1-felipe.contreras@gmail.com/

Cheers.

-- 
Felipe Contreras

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

* Re: Completion for aliases that wrap aliases that wrap Git commands
  2020-11-09 21:56 ` Felipe Contreras
@ 2020-11-10  3:01   ` Philippe Blain
  0 siblings, 0 replies; 3+ messages in thread
From: Philippe Blain @ 2020-11-10  3:01 UTC (permalink / raw)
  To: Felipe Contreras; +Cc: Git mailing list

Hi Felipe,

> Le 9 nov. 2020 à 16:56, Felipe Contreras <felipe.contreras@gmail.com> a écrit :
> 
> Hello,
> 
> On Fri, Nov 6, 2020 at 4:46 PM Philippe Blain
> <levraiphilippeblain@gmail.com> wrote:
> 
>> I know nothing about Bash completions, but I'm wondering if that feature would
>> be possible at all ?
> 
> Yeap. I just sent a patch for that:
> 
> https://lore.kernel.org/git/20201109215248.461167-1-felipe.contreras@gmail.com/

Great! thanks.

Philippe.

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

end of thread, other threads:[~2020-11-10  3:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06 22:42 Completion for aliases that wrap aliases that wrap Git commands Philippe Blain
2020-11-09 21:56 ` Felipe Contreras
2020-11-10  3:01   ` Philippe Blain

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).