Re: [PATCH v2] completion: add new git_complete helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 17, 2012 at 1:44 AM, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote:
> Felipe Contreras wrote:
>
>> Even more, I just added a foobar() function in my profile, and I also
>> added a foobar() function in /etc/bash_completion.d/git. I don't see
>> my function replaced in any way, even after typing and completing
>> 'git' commands. I don't know how that's possible, but that's why I
>> don't like to take these types of claims as face value.
>
> What version of the bash_completion library do you use?  Lazy-loading
> was introduced in version 1.90.

1.99

> If you put
>
>        foobar() {
>                echo hi
>        }
>        . /etc/bash_completion
>
> then is your private foobar unclobbered?

Yes, in that case it does, but that's not the default behavior, at
least not in my system, and I doubt anybody would define their
functions before loading library scripts.

> To answer your demand before for a function in the public interface of
> a completion script, not library, which respects or does not respect
> the bash-completion convention: see the public _rpm_installed_packages
> helper from the rpm completion script[1].

What makes you think this is public? It's under the section '# helper
functions', which doesn't seem to be public. Plus, it's repeated in
rpm, rpmbuild, and rpmbuild-md5.

The fact that somebody uses it doesn't mean it's public.

Cheers.

-- 
Felipe Contreras
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]