Fix zsh installation instructions
diff mbox series

Message ID pull.814.git.git.1593687080695.gitgitgadget@gmail.com
State New
Headers show
Series
  • Fix zsh installation instructions
Related show

Commit Message

Derrick Stolee via GitGitGadget July 2, 2020, 10:51 a.m. UTC
From: Alexey <lesha.ogonkov@gmail.com>

- 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(-)


base-commit: a08a83db2bf27f015bec9a435f6d73e223c21c5e

Comments

Junio C Hamano July 6, 2020, 10:42 p.m. UTC | #1
> From: Alexey <lesha.ogonkov@gmail.com>

Thanks.

Any zsh users raise their hands?  Does this change look sane?

> - 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

Patch
diff mbox series

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 ()
 {