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

Re: [PATCH] Refactor git-completion to allow ZSH usage of PS1 functions

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 26, 2011, 19:15 UTC
Message-ID
<7vtydkddto.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4DB702E6.5090105@gmail.com>
Marius Storm-Olsen <mstormo@gmail.com> writes:
> Junio C Hamano said the following on 26.04.2011 12:21:
>> I'd be very negative on splitting this file into more than one files.
>
> The only other option would be duplication. Is that preferred?

That is not the answer I was hoping to hear. Can't we think of a way to share without duplication the common parts and have tweaks per two shell implementations?

A conditional that says "Do this part only if I am zsh" in a single file is fine. Makefile that concatenates the common one and specific one among two would also be acceptable, even though it makes things more cumbersome to the user. But no matter what you do, I would really prefer for the user to have to copy just _one_ file, not two.

Previous: Marius Storm-OlsenNext: Marius Storm-Olsen
Message 4 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.