git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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 && bashcompinit
Er, autoload -U +X.
-- 
Felipe Contreras
Previous: Felipe ContrerasNext: Marius Storm-Olsen
Message 10 of 11 in “Refactor git-completion to allow ZSH usage of PS1 functions”
  1. Refactor git-completion to allow ZSH usage of PS1 functionsMarius Storm-Olsen, Apr 26, 2011
  2. Junio C HamanoApr 26, 2011
  3. Marius Storm-OlsenApr 26, 2011
  4. Junio C HamanoApr 26, 2011
  5. Automatically autoload bashcompinit for ZSH, when neededMarius Storm-Olsen, Apr 26, 2011
  6. Matthieu MoyApr 26, 2011
  7. Marius Storm-OlsenApr 26, 2011
  8. Junio C HamanoApr 26, 2011
  9. Felipe ContrerasApr 27, 2011
  10. Felipe ContrerasApr 27, 2011
  11. Automatically autoload bashcompinit for ZSH, when neededMarius Storm-Olsen, Apr 27, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.