Re: [PATCH] Automatically autoload bashcompinit for ZSH, when needed
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Apr 27, 2011, 01:22 UTC
- Message-ID
- <BANLkTi=qzBGmp80088hVrc+yicH2ofDGEg@mail.gmail.com>
- In-Reply-To
- <BANLkTindtTVcLetYs1wJ0K9BcQO7YNYpvw@mail.gmail.com>
On Wed, Apr 27, 2011 at 4:11 AM, Felipe Contreras <felipe.contreras@gmail.com> wrote:
Show 17 quoted lines
> On Tue, Apr 26, 2011 at 11:28 PM, Marius Storm-Olsen
> <marius@storm-olsen.com> wrote:
>> If bashcompinit has not already been autoloaded, do so
>> automatically, as it is required to properly parse the
>> git-completion file with ZSH.
>>
>> Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com>
>> ---
>
>> +if [[ -n ${ZSH_VERSION-} ]]; then
>> + if ! bashcompinit >/dev/null 2>&1; then
>> + autoload -U bashcompinit
>> + bashcompinit
>> + fi
>
> How about this instead?
> autoload -UX bashcompinit && bashcompinitEr, autoload -U +X.
-- Felipe Contreras