Re: [PATCH v2] completion: add new git_complete helper
From: Felipe Contreras <hidden>
Date: 2016-06-15 22:53:36
On Mon, Apr 16, 2012 at 11:33 PM, Jonathan Nieder [off-list ref] wrote:
Felipe Contreras wrote:quoted
On Mon, Apr 16, 2012 at 11:09 PM, Jonathan Nieder [off-list ref] wrote:quoted
Felipe Contreras wrote:quoted
quoted
quoted
I would like to see a completion script that actually has a function supposed to be exported and that still uses the _ prefix anyway.The /etc/bash_completion library itself exports lots and lots of functions with a _ prefix.We are not making a bash_completion library; I mean a bash completion script (other than the library).Ok. If you refuse to put two and two together, then I will (as usual when this happens) just be a little passive aggressive and annoyed and let you talk to other people.
Just to be clear; we are making a completion script for the 'git' command, so if we are looking for guidance on what other 'foo' command completion scripts do, the bash completion library itself is not good guidance. My gut feeling is that there's no completion script that exports functions meant to be used directly by the user, so there's really no guidance for this. Now, even if you use the bash completion library, it still does export functions without a prefix, so why take the ones with prefix as a rule, and ignore the other ones? It seems like there's no real guideline for what gets a prefix and what doesn't, even in the bash completion library itself, which I don't think should be used a guideline anyway. The closest relative of 'git_complete' would be 'complete', both of course are meant for public usage. I have not seen any other functions that are similar. Cheers. -- Felipe Contreras