From: Felipe Contreras Date: Sun, 08 Apr 2012 13:07:47 GMT Subject: Re: [PATCH 02/12] completion: simplify __gitcomp Message-ID: In-Reply-To: <20120408124652.GN2289@goldbirke> 2012/4/8 SZEDER Gábor : > On Sun, Apr 08, 2012 at 06:07:49AM +0300, Felipe Contreras wrote: >> The suffix is never used. > > The suffix was used to offer completion after 'git config > branch.' ending with a period.  It is not used by git's > completion script anymore, because nowadays this case is handled by > the __gitcomp_nl helper() function. > > However, users can provide custom completion functions to their > aliases or additional git commands, and there might be a custom > completion function out there that passes a suffix to __gitcomp(). Yes, there _might_ be, and they would have to be fixed; APIs change. However, this is highly theoretical, what suffix could anybody possibly want? I believe __gitcomp_1 already does the job of adding sensible suffixes, and there's nothing else anybody else could possibly want. In any case, shouldn't compgen -S "${4-}" do the trick? > We don't want to break those custom completion functions, so I think > the suffix should stay. So we should never make any cleanups because some custom completion functions might theoretically break? I think at some point we need to accept that nobody is using this argument anyway (and they should). Cheers. -- Felipe Contreras