Re: [PATCH v2] completion: add new git_complete helper
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Apr 16, 2012, 22:44 UTC
- Message-ID
- <20120416224411.GU12613@burratino>
- In-Reply-To
- <CAMP44s1TkE=rd8AxbBnR4a8FwY+H9MHxYOhcks9fsnuK1iL_oA@mail.gmail.com>
Felipe Contreras wrote:
Show 5 quoted lines
> 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.
If you put
foobar() {
echo hi
}
. /etc/bash_completionthen is your private foobar unclobbered?
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].
If you don't like the convention or think that I have misunderstood it, I can understand that and would recommend that you suggest a different one and get it adopted and documented by the bash_completion project.
Jonathan
[1] http://lists.alioth.debian.org/pipermail/bash-completion-devel/2012-March/004359.html