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:11 UTC
Message-ID
<BANLkTindtTVcLetYs1wJ0K9BcQO7YNYpvw@mail.gmail.com>
In-Reply-To
<1303849690-20894-1-git-send-email-mstormo@gmail.com>

On Tue, Apr 26, 2011 at 11:28 PM, Marius Storm-Olsen <marius@storm-olsen.com> wrote:

Show 6 quoted lines
> 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>
> ---
Show 5 quoted lines
> +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

-- 
Felipe Contreras
Previous: Junio C HamanoNext: Felipe Contreras
Message 9 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.