# [PATCH] completion (zsh): fix misleading install location

5 messages from 2019-06-06 to 2019-10-01. Participants: Durant Schoon, Denton Liu, Felipe Contreras, Maxim Belsky.
Thread: https://gitlist.dev/t/51255

## Durant Schoon, 2019-06-06 21:38

Subject: [PATCH] completion (zsh): fix misleading install location
Message-ID: <0102016b2ebafc26-1bd39076-62e4-4b7e-9309-b08cc072fbdf-000000@eu-west-1.amazonses.com>
URL: https://gitlist.dev/e/0102016b2ebafc26-1bd39076-62e4-4b7e-9309-b08cc072fbdf-000000%40eu-west-1.amazonses.com

```
When the code comment in the zsh completion suggests that this file
should be copied to `~/.zsh`, many users might be misled to believe that
this refers to a file location. But it refers to a directory, and won't
work when it is a file.

Let's just add a slash, to make it abundantly clear that this must be a
directory.

(thank you to Johannes Schindelin for the suggested wording and title)

Signed-off-by: B. Durant Schoon durant.schoon@gmail.com
---
 contrib/completion/git-completion.zsh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
index 886bf95d1f594..0e63004e2613e 100644
--- a/contrib/completion/git-completion.zsh
+++ b/contrib/completion/git-completion.zsh
@@ -11,8 +11,8 @@
 #
 #  zstyle ':completion:*:*:git:*' script ~/.git-completion.zsh
 #
-# The recommended way to install this script is to copy to '~/.zsh/_git', and
-# then add the following to your ~/.zshrc file:
+# The recommended way to install this script is to copy to '~/.zsh/_git/',
+# and then add the following to your ~/.zshrc file:
 #
 #  fpath=(~/.zsh $fpath)
 

--
https://github.com/git/git/pull/609

```

## Denton Liu, 2019-06-06 22:44

Subject: Re: [PATCH] completion (zsh): fix misleading install location
Message-ID: <20190606224450.GA31942@archbookpro.localdomain>
URL: https://gitlist.dev/e/20190606224450.GA31942%40archbookpro.localdomain
In-Reply-To: <0102016b2ebafc26-1bd39076-62e4-4b7e-9309-b08cc072fbdf-000000@eu-west-1.amazonses.com>

```
Hi Durant,

Just a couple of small things:

On Thu, Jun 06, 2019 at 09:38:54PM +0000, Durant Schoon wrote:
> When the code comment in the zsh completion suggests that this file
> should be copied to `~/.zsh`, many users might be misled to believe that
> this refers to a file location. But it refers to a directory, and won't
> work when it is a file.
> 
> Let's just add a slash, to make it abundantly clear that this must be a
> directory.
> 
> (thank you to Johannes Schindelin for the suggested wording and title)

Maybe this would be better incorporated as a Helped-by: or Suggested-by:
tag at the bottom?

> 
> Signed-off-by: B. Durant Schoon durant.schoon@gmail.com

The email in your sign-off line should be wrapped in <>, i.e. it should
be

	B. Durant Schoon <durant.schoon@gmail.com>

Other than that, the patch looks fine to me.

Thanks,

Denton

> ---
>  contrib/completion/git-completion.zsh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
> index 886bf95d1f594..0e63004e2613e 100644
> --- a/contrib/completion/git-completion.zsh
> +++ b/contrib/completion/git-completion.zsh
> @@ -11,8 +11,8 @@
>  #
>  #  zstyle ':completion:*:*:git:*' script ~/.git-completion.zsh
>  #
> -# The recommended way to install this script is to copy to '~/.zsh/_git', and
> -# then add the following to your ~/.zshrc file:
> +# The recommended way to install this script is to copy to '~/.zsh/_git/',
> +# and then add the following to your ~/.zshrc file:
>  #
>  #  fpath=(~/.zsh $fpath)
>  
> 
> --
> https://github.com/git/git/pull/609

```

## Felipe Contreras, 2019-06-06 22:52

Subject: Re: [PATCH] completion (zsh): fix misleading install location
Message-ID: <CAMP44s2w2ByBAx5rdc+M7Z=CWN7+CXMLECcpfYGHBxO277xFdg@mail.gmail.com>
URL: https://gitlist.dev/e/CAMP44s2w2ByBAx5rdc%2BM7Z%3DCWN7%2BCXMLECcpfYGHBxO277xFdg%40mail.gmail.com
In-Reply-To: <0102016b2ebafc26-1bd39076-62e4-4b7e-9309-b08cc072fbdf-000000@eu-west-1.amazonses.com>

```
On Thu, Jun 6, 2019 at 5:37 PM Durant Schoon <durant.schoon@gmail.com> wrote:

> diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
> index 886bf95d1f594..0e63004e2613e 100644
> --- a/contrib/completion/git-completion.zsh
> +++ b/contrib/completion/git-completion.zsh
> @@ -11,8 +11,8 @@
>  #
>  #  zstyle ':completion:*:*:git:*' script ~/.git-completion.zsh
>  #
> -# The recommended way to install this script is to copy to '~/.zsh/_git', and
> -# then add the following to your ~/.zshrc file:
> +# The recommended way to install this script is to copy to '~/.zsh/_git/',
> +# and then add the following to your ~/.zshrc file:

~/.zsh/_git should be a file, not a directory.

-- 
Felipe Contreras

```

## Durant Schoon, 2019-09-24 20:51

Subject: [PATCH] completion (zsh): fix misleading install location
Message-ID: <0102016d650b16ca-073c796f-065f-4966-9f94-f276c8fe6ee7-000000@eu-west-1.amazonses.com>
URL: https://gitlist.dev/e/0102016d650b16ca-073c796f-065f-4966-9f94-f276c8fe6ee7-000000%40eu-west-1.amazonses.com
In-Reply-To: <0102016b2ebafc26-1bd39076-62e4-4b7e-9309-b08cc072fbdf-000000@eu-west-1.amazonses.com>

```
When the code comment in the zsh completion suggests that this file
should be copied to `~/.zsh`, many users might be misled to believe that
this refers to a file location. But it refers to a directory, and won't
work when it is a file.

Let's just add a slash, to make it abundantly clear that this must be a
directory.

Signed-off-by: B. Durant Schoon <durant.schoon@gmail.com>
Helped-by: Johannes Schindelin
---
 contrib/completion/git-completion.zsh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
index 886bf95d1f594..0e63004e2613e 100644
--- a/contrib/completion/git-completion.zsh
+++ b/contrib/completion/git-completion.zsh
@@ -11,8 +11,8 @@
 #
 #  zstyle ':completion:*:*:git:*' script ~/.git-completion.zsh
 #
-# The recommended way to install this script is to copy to '~/.zsh/_git', and
-# then add the following to your ~/.zshrc file:
+# The recommended way to install this script is to copy to '~/.zsh/_git/',
+# and then add the following to your ~/.zshrc file:
 #
 #  fpath=(~/.zsh $fpath)
 

--
https://github.com/git/git/pull/609

```

## Maxim Belsky, 2019-10-01 21:05

Subject: Re: [PATCH] completion (zsh): fix misleading install location
Message-ID: <30798B33-EF82-449F-BDF3-B639A292BCFA@gmail.com>
URL: https://gitlist.dev/e/30798B33-EF82-449F-BDF3-B639A292BCFA%40gmail.com
In-Reply-To: <0102016b2ebafc26-1bd39076-62e4-4b7e-9309-b08cc072fbdf-000000@eu-west-1.amazonses.com>

```
Hey, 

I face same issue a few days ago. Initially I thought `~/.zsh/_git` should be a dictionary. I’ve made all required actions, but completion didn't work. After a few hours I found that it should be just a file instead of a dictionary.

I have two ideas how to patch this comments to help another users setup completion:

1. Add a note that `~/.zsh/_git` should be a file https://github.com/mbelsky/git/commit/e951a0dee5f124ad755d32fa5cc5cded471d389b 
2. Change the patch to make it more obvious https://github.com/mbelsky/git/commit/6c839727163b29b2d2cf5d2ec7f780c2826848d6

It’s my first time mail listing experience so I just put links on github to don’t make something wrong.

What do you think about this changes? 

> On 7 Jun 2019, at 00:38, Durant Schoon <durant.schoon@gmail.com> wrote:
> 
> diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
> index 886bf95d1f594..0e63004e2613e 100644
> --- a/contrib/completion/git-completion.zsh
> +++ b/contrib/completion/git-completion.zsh
> @@ -11,8 +11,8 @@
> #
> #  zstyle ':completion:*:*:git:*' script ~/.git-completion.zsh
> #
> -# The recommended way to install this script is to copy to '~/.zsh/_git', and
> -# then add the following to your ~/.zshrc file:
> +# The recommended way to install this script is to copy to '~/.zsh/_git/',
> +# and then add the following to your ~/.zshrc file:

```
