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

Re: [PATCH v3 1/4] completion: be nicer with zsh

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Feb 2, 2012, 11:00 UTC
Message-ID
<CAMP44s3BcSGPCKPr_2EpGQRAv_kDM2_OQiyKDT7qY=QR0cHYpQ@mail.gmail.com>
In-Reply-To
<8739at8qw6.fsf@thomas.inf.ethz.ch>
On Thu, Feb 2, 2012 at 12:35 PM, Thomas Rast <trast@inf.ethz.ch> wrote:
Show 16 quoted lines
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
>> On Thu, Feb 2, 2012 at 10:48 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
>>
>> Exactly, and "completion: avoid default value assignment on : true
>> command" tells *nothing* to most people. Why is this patch needed? Do
>> I care about it?
>>
>> OTOH "completion: be nicer with zsh" explains the purpose of the patch
>> and people that don't care about zsh can happily ignore it if they
>> want, and the ones that care about zsh might want to back port it, or
>> whatever.
>
> Perhaps you could compromise on
>
>  completion: work around zsh word splitting bug in : ${foo:=$(bar)}
Yes, that sounds better, perhaps:
completion: work around zsh option propagation bug
Show 8 quoted lines
>> | tl;dr: $__git_porcelain_commands = $__git_all_commands
>>
>> Wrapping it up, to make clear what happens.
>
> I think this is not good style for a commit message.  Apart from the
> very trendy use of tl;dr, it doesn't even properly summarize the cause
> *or* the user-visible symptom.  It just states how the confusion
> propagates somewhere in the middle of the code.
I don't think the cause or the user-visible symptom need any summary.

I was trying to summarize this: --- This is because in zsh the following code:

 for i in $__git_all_commands

would evaluate $__git_all_commands as a single word (with spaces), ${=__git_all_commands} should be used to do word splitting expansion (unless SH_WORD_SPLIT is used).

sh emulation should take care of that, but the command expantion is messing up with that. ---

-- 
Felipe Contreras
Previous: Jonathan NiederNext: Junio C Hamano
Message 7 of 38 in “completion: couple of cleanups”
  1. 0/4 completion: couple of cleanupsFelipe Contreras, Feb 2, 2012
  2. Jonathan NiederFeb 2, 2012
  3. Felipe ContrerasFeb 2, 2012
  4. Thomas RastFeb 2, 2012
  5. Jonathan NiederFeb 2, 2012
  6. Jonathan NiederFeb 2, 2012
  7. Felipe ContrerasFeb 2, 2012
  8. Junio C HamanoFeb 2, 2012
  9. Felipe ContrerasFeb 2, 2012
  10. Junio C HamanoFeb 3, 2012
  11. Felipe ContrerasFeb 3, 2012
  12. Junio C HamanoFeb 3, 2012
  13. Felipe ContrerasFeb 4, 2012
  14. [bug] blame duplicates trailing ">" in mailmapped emailsJeff King, Feb 4, 2012
  15. Felipe ContrerasFeb 4, 2012
  16. Jeff KingFeb 4, 2012
  17. Felipe ContrerasFeb 5, 2012
  18. Jeff KingFeb 5, 2012
  19. Junio C HamanoFeb 5, 2012
  20. Junio C HamanoFeb 5, 2012
  21. Jeff KingFeb 5, 2012
  22. Junio C HamanoFeb 6, 2012
  23. Jeff KingFeb 6, 2012
  24. Junio C HamanoFeb 6, 2012
  25. Junio C HamanoFeb 6, 2012
  26. Jeff KingFeb 6, 2012
  27. Felipe ContrerasFeb 6, 2012
  28. Junio C HamanoFeb 6, 2012
  29. Felipe ContrerasFeb 6, 2012
  30. Junio C HamanoFeb 5, 2012
  31. Jonathan NiederFeb 2, 2012
  32. Junio C HamanoFeb 2, 2012
  33. Jonathan NiederFeb 2, 2012
  34. Felipe ContrerasFeb 2, 2012
  35. Jonathan NiederFeb 2, 2012
  36. Felipe ContrerasFeb 2, 2012
  37. Jonathan NiederFeb 2, 2012
  38. Felipe ContrerasFeb 2, 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.