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

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.version-control.git
	nntp://ie5yzdi7fg72h7s4sdcztq5evakq23rdt33mfyfcddc5u3ndnw24ogqd.onion/inbox.comp.version-control.git
	nntp://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

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

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

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git