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

Re: [PATCH] Fix zsh installation instructions

From
SHStefan Haller <lists@haller-berlin.de>
Date
Oct 14, 2020, 15:10 UTC
Message-ID
<abc4ab95-ed65-1d6b-e964-73734c08cda9@haller-berlin.de>
In-Reply-To
<xmqqr1to8dv9.fsf@gitster.c.googlers.com>
On 07.07.20 0:42, Junio C Hamano wrote:
Show 5 quoted lines
>> From: Alexey <lesha.ogonkov@gmail.com>
> 
> Thanks.
> 
> Any zsh users raise their hands?  Does this change look sane?
Sorry for the late reply, I only saw this now.

Yes, the change is sane. The wrong file extension (.zsh vs. .bash) was a documentation bug that I had noticed myself, but forgot to submit a patch for.

The other hunk (adding compinit) is not so important to me; I suppose it was not in the original version because most zsh users already have this in their .zshrc anyway. But it's not wrong, and doesn't hurt to have here, I guess.

Best, Stefan

Show 44 quoted lines
>> - Fix wrong script in completion configuration. zsh wants bash completion
>>    path here, not path to itself.
>> - Add `compinit` autoload command, since whole thing didn't work
>>    if it is not loaded.
>>
>> Signed-off-by: Alexey <lesha.ogonkov@gmail.com>
>> ---
>>      Fix zsh installation instructions
>>      
>>       * Fix wrong script in completion configuration. zsh wants bash
>>         completion path here, not path to itself.
>>       * Add compinit autoload command, since whole thing didn't work if it is
>>         not loaded.
>>
>> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-814%2Fogonkov%2Fpatch-1-v1
>> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-814/ogonkov/patch-1-v1
>> Pull-Request: https://github.com/git/git/pull/814
>>
>>   contrib/completion/git-completion.zsh | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
>> index ce47e86b60..107869036d 100644
>> --- a/contrib/completion/git-completion.zsh
>> +++ b/contrib/completion/git-completion.zsh
>> @@ -9,13 +9,14 @@
>>   #
>>   # If your script is somewhere else, you can configure it on your ~/.zshrc:
>>   #
>> -#  zstyle ':completion:*:*:git:*' script ~/.git-completion.zsh
>> +#  zstyle ':completion:*:*:git:*' script ~/.git-completion.bash
>>   #
>>   # The recommended way to install this script is to make a copy of it in
>>   # ~/.zsh/ directory as ~/.zsh/git-completion.zsh and then add the following
>>   # to your ~/.zshrc file:
>>   #
>>   #  fpath=(~/.zsh $fpath)
>> +#  autoload -Uz compinit && compinit
>>   
>>   complete ()
>>   {
>>
>> base-commit: a08a83db2bf27f015bec9a435f6d73e223c21c5e
> 
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 17 in “Fix zsh installation instructions”
  1. Fix zsh installation instructionsAlexey via GitGitGadget, Jul 2, 2020
  2. Junio C HamanoJul 6, 2020
  3. Stefan HallerOct 14, 2020
  4. Junio C HamanoOct 16, 2020
  5. Felipe ContrerasOct 25, 2020
  6. Stefan HallerOct 27, 2020
  7. Stefan HallerOct 27, 2020
  8. Лёша ОгоньковOct 27, 2020
  9. Junio C HamanoOct 27, 2020
  10. Felipe ContrerasOct 28, 2020
  11. Junio C HamanoOct 29, 2020
  12. Junio C HamanoOct 29, 2020
  13. Felipe ContrerasNov 2, 2020
  14. Felipe ContrerasNov 2, 2020
  15. Junio C HamanoNov 3, 2020
  16. Junio C HamanoNov 2, 2020
  17. Felipe ContrerasOct 28, 2020

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.