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

Re: [PATCH] completion: reduce overhead of clearing cached --options

From
Matthew Coleman <matt@1eanda.com>
Date
Apr 16, 2018, 20:35 UTC
Message-ID
<6A862FDA-1EBA-47BB-8C99-AB09DA91955D@1eanda.com>
In-Reply-To
<CA+P7+xqVdhJ3PrGjQWcofHJV3E1UYWVHEXVt5yaV3Ycv1YvkTg@mail.gmail.com>
Disclaimer: I'm not a zsh user, so please correct anything I might have gotten wrong.

I created a .zshrc with the following contents: autoload -Uz compinit compinit source /usr/local/lib/python3.6/site-packages/powerline/bindings/zsh/powerline.zsh

zsh doesn't have broken Unicode output in its `set` builtin, so it was not affected by the original issue. Applying the patch does not cause any change in behavior.
Since the commit only changes a file with "bash" in its name, but the conditional references zsh variables, I think it's worth mentioning something about it in the commit message.

I think the bash side of things is all set for this commit, but can a similar improvement be made (using a builtin instead of parsing set|sed) for zsh? Again, I'm not a zsh user, so some input from someone who's written zsh completion rules would be very helpful. Can any of the builtins mentioned in this zsh documentation be used instead of set|sed? http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fcomputil-Module

Show 28 quoted lines
> On Apr 16, 2018, at 2:23 PM, Jacob Keller <jacob.keller@gmail.com> wrote:
> 
> On Sat, Apr 14, 2018 at 6:27 AM, Jakub Narebski <jnareb@gmail.com> wrote:
>> SZEDER Gábor <szeder.dev@gmail.com> writes:
>>> On Fri, Apr 13, 2018 at 11:44 PM, Jakub Narebski <jnareb@gmail.com> wrote:
>>>> SZEDER Gábor <szeder.dev@gmail.com> writes:
>>>>> 
>>>>> In Bash we can do better: run the 'compgen -v __gitcomp_builtin_'
>>>>> builtin command, which lists the same variables, but without a
>>>>> pipeline and 'sed' it can do so with lower overhead.
>>>> 
>>>> What about ZSH?
>>> 
>>> Nothing, ZSH is unaffected by this patch.
>> 
>> All right, so for ZSH we would need LC_ALL=C trick, or come with some
>> equivalent of 'compgen -v __gitcomp_builtin_' for this shell.
>> 
>> Good patch, though it does not solve whole of the problem.
>> 
>> Best,
>> --
>> Jakub Narębski
> 
> Is ZSH actually affected by the broken set behavior, though?
> 
> Thanks,
> Jake
Previous: Jacob KellerNext: Junio C Hamano
Message 15 of 38 in “specify encoding for sed command”
  1. specify encoding for sed commandStephon Harris, Apr 5, 2018
  2. Ævar Arnfjörð BjarmasonApr 5, 2018
  3. Eric SunshineApr 5, 2018
  4. SZEDER GáborApr 5, 2018
  5. Matt ColemanApr 10, 2018
  6. Matt ColemanApr 11, 2018
  7. Matthew ColemanApr 12, 2018
  8. SZEDER GáborApr 13, 2018
  9. Matthew ColemanApr 13, 2018
  10. completion: reduce overhead of clearing cached --optionsSZEDER Gábor, Apr 13, 2018
  11. Jakub NarebskiApr 13, 2018
  12. SZEDER GáborApr 13, 2018
  13. Jakub NarebskiApr 14, 2018
  14. Jacob KellerApr 16, 2018
  15. Matthew ColemanApr 16, 2018
  16. Junio C HamanoApr 16, 2018
  17. SZEDER GáborApr 16, 2018
  18. Jakub NarębskiApr 16, 2018
  19. Junio C HamanoApr 16, 2018
  20. completion: reduce overhead of clearing cached --optionsSZEDER Gábor, Apr 17, 2018
  21. Junio C HamanoApr 17, 2018
  22. Matthew ColemanMay 7, 2018
  23. Todd ZullingerMay 8, 2018
  24. Junio C HamanoMay 8, 2018
  25. Jonathan NiederJun 7, 2018
  26. Dave BorowitzJun 7, 2018
  27. Rick van HattemJun 7, 2018
  28. SZEDER GáborJun 8, 2018
  29. Jonathan NiederJun 8, 2018
  30. SZEDER GáborJun 8, 2018
  31. Jonathan NiederJun 8, 2018
  32. SZEDER GáborJun 8, 2018
  33. Junio C HamanoJun 11, 2018
  34. completion: correct zsh detection when run from git-completion.zsh (Re: [PATCH v2] completion: reduce overhead of clearing cached --options)Jonathan Nieder, Jun 11, 2018
  35. SZEDER GáborJun 12, 2018
  36. SZEDER GáborJun 12, 2018
  37. Rick van HattemJun 12, 2018
  38. Junio C HamanoApr 8, 2018

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.