Re: [PATCH] git-completion: Add git help completion for aliases
- From
Erik Faye-Lund <kusmabite@gmail.com>
- Date
- Mar 22, 2011, 09:16 UTC
- Message-ID
- <AANLkTi=zbsNxLSCcWQorZCnRFuDPujqYzW7B0xJx2FHp@mail.gmail.com>
- In-Reply-To
- <20110322085027.GF14520@neumann>
2011/3/22 SZEDER Gábor <szeder@ira.uka.de>:
Show 17 quoted lines
> On Tue, Mar 22, 2011 at 12:53:43AM -0700, Junio C Hamano wrote: >> This is a constructive tangent but if we are going to run $(__git_aliases) >> every time we run _git_help, perhaps it would want a hack similar to the >> way the value for $__git_all_commands is generated just once? > > I think this is not necessary. We already run __git_aliases() every > time after 'git <TAB>', and it was not an issue so far. And indeed, I > just created 50 aliases, and the time required for __git_aliases() > seems to be negligible: > > $ time __git_aliases > <bunch of aliases> > > real 0m0.028s > user 0m0.016s > sys 0m0.004s >
Unfortunately, the situation is not quite so good on Windows: $ time __git_aliases <bunch of aliases>
real 0m0.112s user 0m0.030s sys 0m0.015s
This is with 50 aliases, with 0 aliases I get this: $ time __git_aliases test
real 0m0.063s user 0m0.015s sys 0m0.015s