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

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

 



(cc-ing the bash-completion-devel list)
Felipe Contreras wrote:
> On Mon, Apr 16, 2012 at 11:46 PM, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote:
>> Felipe Contreras wrote:

>>> Now, even if you use the bash completion library, it still does export
>>> functions without a prefix
>>
>> Are you sure?  "complete" is a bash builtin and has nothing to do with
>> the bash completion library except that the latter uses it.
>
> I already provided examples:
> have(), quote(), dequote(), quote_readline()

Ah, that's what you mean.  Thanks for the pointers, and sorry to have
misunderstood.

There's a little oddity here.  "have" is clearly an unwanted backward
compatibility feature:

	# @deprecated should no longer be used; generally not needed with dynamically
	#             loaded completions, and _have is suitable for runtime use.
	have()
	[...]
	unset -f have
	unset have

But "quote", "dequote", and "quote_readline" do not get the same
treatment.  Perhaps they are for backward compatibility, too, but are
so widely used that there is no hope of ever getting rid of them.

Hopefully this information helps clarify to what extent the leading
underscores in functions exposed by completion scripts are meant or
are not meant as a convention.

Jonathan
--
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]