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

Re: [PATCH] tcsh-completion re-using git-completion.bash

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Nov 16, 2012, 21:56 UTC
Message-ID
<CAMP44s0y3UPVT+ndELaKNsWXAPG3kv-Xq_Wf6ONDF3Z99A5zMQ@mail.gmail.com>
In-Reply-To
<7vr4ntkzy4.fsf@alter.siamese.dyndns.org>
On Fri, Nov 16, 2012 at 10:20 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 11 quoted lines
> SZEDER Gábor <szeder@ira.uka.de> writes:
>
>> For zsh, perhaps?
>
> Yeah, I was wondering about that.
>
> If we make zsh completion read output from a little stub in bash
> completion, just like Felipe steered this series for tcsh, we do not
> have to worry about "zsh does not split words unless emulating a
> shell and here is a way to tell zsh to do so" kind of stuff in bash
> completion.

Do we worry about that now? If we do, the only reason is because we hadn't had a proper wrapper, like the one I'm proposing to merge. So, we had to put things inside if [[ -n ${ZSH_VERSION-} ]]. Those things would move to my wrapper.

The only exception where we had to change code outside of that chunk that I'm aware of is '8d58c90 completion: Use parse-options raw output for simple long options', which is probably fixed in later versions of zsh, and if not, we could always replace those functions inside my wrapper.

> The point is not about the quality of zsh's emulation
> of (k)sh when it is run under that mode, but is about not having to
> have that logic in bash-only part in the first place.

As I said, that logic can be moved away _if_ my wrapper is merged. But then again, that would cause regressions to existing users.

Maybe we should warn them right now that they should be using my wrapper, and that this method of zsh support would be obsoleted. But my wrapper probably hasn't received enough testing, so do we really want to do that right now?

Either way, I'm confident that whatever code we need can be consolidated in git-completion.zsh, even without having to run bash.

Cheers.
-- 
Felipe Contreras
Previous: Junio C HamanoNext: Marc Khouzam
Message 28 of 39 in “Fwd: [PATCH] Add tcsh-completion support to contrib by using git-completion.bash”
  1. Marc KhouzamNov 12, 2012
  2. SZEDER GáborNov 13, 2012
  3. Marc KhouzamNov 13, 2012
  4. SZEDER GáborNov 13, 2012
  5. completion: remove 'help' duplicate from porcelain commandsSZEDER Gábor, Nov 14, 2012
  6. Marc KhouzamNov 14, 2012
  7. tcsh-completion re-using git-completion.bashMarc Khouzam, Nov 15, 2012
  8. Felipe ContrerasNov 16, 2012
  9. Marc KhouzamNov 16, 2012
  10. Felipe ContrerasNov 16, 2012
  11. Marc KhouzamNov 16, 2012
  12. tcsh-completion re-using git-completion.bashMarc Khouzam, Nov 16, 2012
  13. Felipe ContrerasNov 16, 2012
  14. tcsh-completion re-using git-completion.bashMarc Khouzam, Nov 16, 2012
  15. Junio C HamanoNov 16, 2012
  16. Felipe ContrerasNov 16, 2012
  17. Felipe ContrerasNov 16, 2012
  18. Marc KhouzamNov 16, 2012
  19. Felipe ContrerasNov 16, 2012
  20. SZEDER GáborNov 16, 2012
  21. Felipe ContrerasNov 16, 2012
  22. SZEDER GáborNov 16, 2012
  23. Felipe ContrerasNov 16, 2012
  24. SZEDER GáborNov 17, 2012
  25. Felipe ContrerasNov 17, 2012
  26. SZEDER GáborNov 17, 2012
  27. Junio C HamanoNov 16, 2012
  28. Felipe ContrerasNov 16, 2012
  29. Marc KhouzamNov 17, 2012
  30. Felipe ContrerasNov 17, 2012
  31. Marc KhouzamNov 20, 2012
  32. Felipe ContrerasNov 20, 2012
  33. Marc KhouzamNov 20, 2012
  34. Junio C HamanoNov 20, 2012
  35. Felipe ContrerasNov 13, 2012
  36. SZEDER GáborNov 14, 2012
  37. Felipe ContrerasNov 15, 2012
  38. Marc KhouzamNov 14, 2012
  39. SZEDER GáborNov 14, 2012

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.