All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] doc: Add a note about ~/.zsh/_git file
@ 2019-10-10 16:56 Max Belsky via GitGitGadget
  2019-10-10 16:56 ` [PATCH 1/1] doc: Change zsh git completion file name Maxim Belsky via GitGitGadget
  2019-10-11 17:54 ` [PATCH v2 0/1] doc: Add a note about ~/.zsh/_git file Max Belsky via GitGitGadget
  0 siblings, 2 replies; 13+ messages in thread
From: Max Belsky via GitGitGadget @ 2019-10-10 16:56 UTC (permalink / raw)
  To: git; +Cc: Max Belsky, Junio C Hamano

Hey,

Today I've spent a few hours to understand why git-completion doesn't work
in my zsh shell. It was because I thought ~/.zsh/_git should be a dictionary
with git-completion.zsh file. 

I think this change may save some hours for someone else.

Maxim Belsky (1):
  doc: Change zsh git completion file name

 contrib/completion/git-completion.zsh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


base-commit: 4c86140027f4a0d2caaa3ab4bd8bfc5ce3c11c8a
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-367%2Fmbelsky%2Fpatch-1-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-367/mbelsky/patch-1-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/367
-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/1] doc: Change zsh git completion file name
  2019-10-10 16:56 [PATCH 0/1] doc: Add a note about ~/.zsh/_git file Max Belsky via GitGitGadget
@ 2019-10-10 16:56 ` Maxim Belsky via GitGitGadget
  2019-10-10 21:12   ` Johannes Schindelin
  2019-10-11 17:54 ` [PATCH v2 0/1] doc: Add a note about ~/.zsh/_git file Max Belsky via GitGitGadget
  1 sibling, 1 reply; 13+ messages in thread
From: Maxim Belsky via GitGitGadget @ 2019-10-10 16:56 UTC (permalink / raw)
  To: git; +Cc: Max Belsky, Junio C Hamano, Maxim Belsky

From: Maxim Belsky <public.belsky@gmail.com>

Signed-off-by: Maxim Belsky <public.belsky@gmail.com>
---
 contrib/completion/git-completion.zsh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
index 886bf95d1f..c0eca3ff25 100644
--- a/contrib/completion/git-completion.zsh
+++ b/contrib/completion/git-completion.zsh
@@ -11,8 +11,9 @@
 #
 #  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-completion.zsh', and then add the following to your ~/.zshrc
+# file:
 #
 #  fpath=(~/.zsh $fpath)
 
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/1] doc: Change zsh git completion file name
  2019-10-10 16:56 ` [PATCH 1/1] doc: Change zsh git completion file name Maxim Belsky via GitGitGadget
@ 2019-10-10 21:12   ` Johannes Schindelin
  2019-10-11  5:57     ` Junio C Hamano
  0 siblings, 1 reply; 13+ messages in thread
From: Johannes Schindelin @ 2019-10-10 21:12 UTC (permalink / raw)
  To: Maxim Belsky via GitGitGadget
  Cc: git, Max Belsky, Junio C Hamano, Maxim Belsky

Hi Maxim,


On Thu, 10 Oct 2019, Maxim Belsky via GitGitGadget wrote:

> From: Maxim Belsky <public.belsky@gmail.com>
>
> Signed-off-by: Maxim Belsky <public.belsky@gmail.com>

I totally agree with the patch, but only because I read a couple of
reports that users were struggling with this. Maybe add a couple of
reference points to the commit message, to describe how easy it is to
miss the fact that it needs to be a _file_, not a directory, and also
describe how `zsh` tells you that there is a problem (even if it does
not report a problem, that's a valuable piece of information for the
commit message).

Thanks,
Johannes
> ---
>  contrib/completion/git-completion.zsh | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
> index 886bf95d1f..c0eca3ff25 100644
> --- a/contrib/completion/git-completion.zsh
> +++ b/contrib/completion/git-completion.zsh
> @@ -11,8 +11,9 @@
>  #
>  #  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-completion.zsh', and then add the following to your ~/.zshrc
> +# file:
>  #
>  #  fpath=(~/.zsh $fpath)
>
> --
> gitgitgadget
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/1] doc: Change zsh git completion file name
  2019-10-10 21:12   ` Johannes Schindelin
@ 2019-10-11  5:57     ` Junio C Hamano
  0 siblings, 0 replies; 13+ messages in thread
From: Junio C Hamano @ 2019-10-11  5:57 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Maxim Belsky via GitGitGadget, git, Max Belsky

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> On Thu, 10 Oct 2019, Maxim Belsky via GitGitGadget wrote:
>
>> From: Maxim Belsky <public.belsky@gmail.com>
>>
>> Signed-off-by: Maxim Belsky <public.belsky@gmail.com>
>
> I totally agree with the patch, but only because I read a couple of
> reports that users were struggling with this. Maybe add a couple of
> reference points to the commit message, to describe how easy it is to
> miss the fact that it needs to be a _file_, not a directory, and also
> describe how `zsh` tells you that there is a problem (even if it does
> not report a problem, that's a valuable piece of information for the
> commit message).

After reading the updated text, and then hearing many people cannot
get if the existing reference to ~/.zsh/_git is about a directory
(to which this should be added as one of the files in it) or a file,
I doubt that the updated text is clear enough for these people.

>> -# 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-completion.zsh', and then add the following to your ~/.zshrc
>> +# file:

Perhaps making it absolutely clear by risking to be overly verbose,
like so?

    The recommended way to install this script is to make a copy of it
    in ~/.zsh/ directory as ~/.zsh/git-completion.zsh and then ...

If my attempt to be overly verbose and absolutely clear above is
giving a wrong piece of advice, then that would be an indication
that the original nor the updated text is clear enough, as they are
the primary sources of information on this matter I used to come up
with the suggestion ;-)

>>  #
>>  #  fpath=(~/.zsh $fpath)
>>
>> --
>> gitgitgadget
>>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 0/1] doc: Add a note about ~/.zsh/_git file
  2019-10-10 16:56 [PATCH 0/1] doc: Add a note about ~/.zsh/_git file Max Belsky via GitGitGadget
  2019-10-10 16:56 ` [PATCH 1/1] doc: Change zsh git completion file name Maxim Belsky via GitGitGadget
@ 2019-10-11 17:54 ` Max Belsky via GitGitGadget
  2019-10-11 17:54   ` [PATCH v2 1/1] doc: Change zsh git completion file name Maxim Belsky via GitGitGadget
  2019-10-15 18:48   ` [PATCH v3 0/1] doc: Add a note about ~/.zsh/_git file Max Belsky via GitGitGadget
  1 sibling, 2 replies; 13+ messages in thread
From: Max Belsky via GitGitGadget @ 2019-10-11 17:54 UTC (permalink / raw)
  To: git; +Cc: Max Belsky, Junio C Hamano

Hey,

Today I've spent a few hours to understand why git-completion doesn't work
in my zsh shell. It was because I thought ~/.zsh/_git should be a dictionary
with git-completion.zsh file. 

I think this change may save some hours for someone else.

Maxim Belsky (1):
  doc: Change zsh git completion file name

 contrib/completion/git-completion.zsh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


base-commit: 4c86140027f4a0d2caaa3ab4bd8bfc5ce3c11c8a
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-367%2Fmbelsky%2Fpatch-1-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-367/mbelsky/patch-1-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/367

Range-diff vs v1:

 1:  ae00e1e393 ! 1:  3f994f3b9a doc: Change zsh git completion file name
     @@ -2,7 +2,15 @@
      
          doc: Change zsh git completion file name
      
     +    The original comment does not describe type of ~/.zsh/_git explicitly
     +    and zsh does not warn or fail if a user create it as a dictionary.
     +    So unexperienced users could be misled by the original comment.
     +
     +    There is a small update to clarify it.
     +
          Signed-off-by: Maxim Belsky <public.belsky@gmail.com>
     +    Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
     +    Helped-by: Junio C Hamano <gitster@pobox.com>
      
       diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
       --- a/contrib/completion/git-completion.zsh
     @@ -13,9 +21,9 @@
       #
      -# 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-completion.zsh', and then add the following to your ~/.zshrc
     -+# file:
     ++# 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)
       

-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 1/1] doc: Change zsh git completion file name
  2019-10-11 17:54 ` [PATCH v2 0/1] doc: Add a note about ~/.zsh/_git file Max Belsky via GitGitGadget
@ 2019-10-11 17:54   ` Maxim Belsky via GitGitGadget
  2019-10-12  1:35     ` Junio C Hamano
  2019-10-14 23:44     ` SZEDER Gábor
  2019-10-15 18:48   ` [PATCH v3 0/1] doc: Add a note about ~/.zsh/_git file Max Belsky via GitGitGadget
  1 sibling, 2 replies; 13+ messages in thread
From: Maxim Belsky via GitGitGadget @ 2019-10-11 17:54 UTC (permalink / raw)
  To: git; +Cc: Max Belsky, Junio C Hamano, Maxim Belsky

From: Maxim Belsky <public.belsky@gmail.com>

The original comment does not describe type of ~/.zsh/_git explicitly
and zsh does not warn or fail if a user create it as a dictionary.
So unexperienced users could be misled by the original comment.

There is a small update to clarify it.

Signed-off-by: Maxim Belsky <public.belsky@gmail.com>
Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Helped-by: Junio C Hamano <gitster@pobox.com>
---
 contrib/completion/git-completion.zsh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
index 886bf95d1f..eef4eff53d 100644
--- a/contrib/completion/git-completion.zsh
+++ b/contrib/completion/git-completion.zsh
@@ -11,8 +11,9 @@
 #
 #  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 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)
 
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 1/1] doc: Change zsh git completion file name
  2019-10-11 17:54   ` [PATCH v2 1/1] doc: Change zsh git completion file name Maxim Belsky via GitGitGadget
@ 2019-10-12  1:35     ` Junio C Hamano
  2019-10-14 23:44     ` SZEDER Gábor
  1 sibling, 0 replies; 13+ messages in thread
From: Junio C Hamano @ 2019-10-12  1:35 UTC (permalink / raw)
  To: Maxim Belsky via GitGitGadget; +Cc: git, Max Belsky

"Maxim Belsky via GitGitGadget" <gitgitgadget@gmail.com> writes:

> Signed-off-by: Maxim Belsky <public.belsky@gmail.com>
> Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
> Helped-by: Junio C Hamano <gitster@pobox.com>

No need to resend (as I'll fix it up locally while queuing), but
your sign-off comes last, as we keep these things chronological.
With help from others, you wrote the patch and finally signed it off
to be applied.

Thanks for working on this.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 1/1] doc: Change zsh git completion file name
  2019-10-11 17:54   ` [PATCH v2 1/1] doc: Change zsh git completion file name Maxim Belsky via GitGitGadget
  2019-10-12  1:35     ` Junio C Hamano
@ 2019-10-14 23:44     ` SZEDER Gábor
  2019-10-15  2:07       ` Junio C Hamano
  2020-10-25  3:40       ` Felipe Contreras
  1 sibling, 2 replies; 13+ messages in thread
From: SZEDER Gábor @ 2019-10-14 23:44 UTC (permalink / raw)
  To: Maxim Belsky via GitGitGadget; +Cc: git, Max Belsky, Junio C Hamano

On Fri, Oct 11, 2019 at 10:54:28AM -0700, Maxim Belsky via GitGitGadget wrote:
> From: Maxim Belsky <public.belsky@gmail.com>
> 
> The original comment does not describe type of ~/.zsh/_git explicitly
> and zsh does not warn or fail if a user create it as a dictionary.
> So unexperienced users could be misled by the original comment.
> 
> There is a small update to clarify it.
> 
> Signed-off-by: Maxim Belsky <public.belsky@gmail.com>
> Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
> Helped-by: Junio C Hamano <gitster@pobox.com>
> ---
>  contrib/completion/git-completion.zsh | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
> index 886bf95d1f..eef4eff53d 100644
> --- a/contrib/completion/git-completion.zsh
> +++ b/contrib/completion/git-completion.zsh
> @@ -11,8 +11,9 @@
>  #
>  #  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 make a copy of it in
> +# ~/.zsh/ directory as ~/.zsh/git-completion.zsh and then add the following

These updated instructions don't work for me, following them gives me
zsh's git completion instead of ours:

  $ ls -l /etc/bash_completion.d/git
  -rwxr-xr-x 1 root root 72165 Oct 15 01:27 /etc/bash_completion.d/git
  $ ls -l ~/.zsh/
  total 8
  -rw-r--r-- 1 szeder szeder 6013 Oct 15 01:27 git-completion.zsh
  $ cat ~/.zshrc 
  # Use modern completion system
  autoload -Uz compinit
  compinit
  
  fpath=(~/.zsh $fpath)
  $ zsh
  % git init --<TAB>
  --bare              -- create a bare repository
  --quiet             -- do not print any results to stdout
  --separate-git-dir  -- create git dir elsewhere and link it using the gitdir
  --shared            -- share repository amongst several users
  --template          -- directory to use as a template for the object databas

That's clearly zsh's fancy completion.

As a non-zsh user I had the impression that it's a well-established
convention that the completion script of a command for zsh is called
'_command', see e.g. all the scripts in:

  https://github.com/zsh-users/zsh-completions/tree/master/src

Instructing users to copy our completion script to
'~/.zsh/git-completion.zsh' goes against this convention.

More importantly, it appears that this is more than a mere convention,
maybe a requirement even; at least renaming our zsh completion script
to follow the convention (IOW following the current install
instructions) makes it work all of a sudden:

  $ mv .zsh/git-completion.zsh .zsh/_git
  $ zsh
  % git init --
  --                      --no-separate-git-dir   --shared 
  --bare                  --no-template           --template=
  --no-bare               --quiet                 
  --no-quiet              --separate-git-dir=     

Now that's our Bash completion script used by zsh.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 1/1] doc: Change zsh git completion file name
  2019-10-14 23:44     ` SZEDER Gábor
@ 2019-10-15  2:07       ` Junio C Hamano
  2020-10-25  3:40       ` Felipe Contreras
  1 sibling, 0 replies; 13+ messages in thread
From: Junio C Hamano @ 2019-10-15  2:07 UTC (permalink / raw)
  To: SZEDER Gábor; +Cc: Maxim Belsky via GitGitGadget, git, Max Belsky

SZEDER Gábor <szeder.dev@gmail.com> writes:

>> -# 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 make a copy of it in
>> +# ~/.zsh/ directory as ~/.zsh/git-completion.zsh and then add the following
>
> These updated instructions don't work for me, following them gives me
> zsh's git completion instead of ours:
> ...
> Instructing users to copy our completion script to
> '~/.zsh/git-completion.zsh' goes against this convention.
> More importantly, it appears that this is more than a mere convention,
> maybe a requirement even; at least renaming our zsh completion script
> to follow the convention (IOW following the current install
> instructions) makes it work all of a sudden:

Thanks for a dose of sanity.  My "Helped-by" was about phrasing and
had nothing with the name of the file, so it should be fixable
without invalidating it ;-)

> -# 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 make a copy of it in
> +# ~/.zsh/ directory as ~/.zsh/git-completion.zsh and then add the following

    # The recommended way to install this script is to make a copy of it in
    # '~/.zsh/' directory as '~/.zsh/_git' and then add the following


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v3 0/1] doc: Add a note about ~/.zsh/_git file
  2019-10-11 17:54 ` [PATCH v2 0/1] doc: Add a note about ~/.zsh/_git file Max Belsky via GitGitGadget
  2019-10-11 17:54   ` [PATCH v2 1/1] doc: Change zsh git completion file name Maxim Belsky via GitGitGadget
@ 2019-10-15 18:48   ` Max Belsky via GitGitGadget
  2019-10-15 18:48     ` [PATCH v3 1/1] doc: Change zsh git completion file name Maxim Belsky via GitGitGadget
  1 sibling, 1 reply; 13+ messages in thread
From: Max Belsky via GitGitGadget @ 2019-10-15 18:48 UTC (permalink / raw)
  To: git; +Cc: Max Belsky, Junio C Hamano

Hey,

Today I've spent a few hours to understand why git-completion doesn't work
in my zsh shell. It was because I thought ~/.zsh/_git should be a dictionary
with git-completion.zsh file. 

I think this change may save some hours for someone else.

Maxim Belsky (1):
  doc: Change zsh git completion file name

 contrib/completion/git-completion.zsh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


base-commit: 108b97dc372828f0e72e56bbb40cae8e1e83ece6
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-367%2Fmbelsky%2Fpatch-1-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-367/mbelsky/patch-1-v3
Pull-Request: https://github.com/gitgitgadget/git/pull/367

Range-diff vs v2:

 1:  3f994f3b9a ! 1:  7919addea8 doc: Change zsh git completion file name
     @@ -8,9 +8,10 @@
      
          There is a small update to clarify it.
      
     -    Signed-off-by: Maxim Belsky <public.belsky@gmail.com>
          Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
          Helped-by: Junio C Hamano <gitster@pobox.com>
     +    Helped-by: SZEDER Gábor <szeder.dev@gmail.com>
     +    Signed-off-by: Maxim Belsky <public.belsky@gmail.com>
      
       diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
       --- a/contrib/completion/git-completion.zsh
     @@ -22,8 +23,8 @@
      -# 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 make a copy of it in
     -+# ~/.zsh/ directory as ~/.zsh/git-completion.zsh and then add the following
     -+# to your ~/.zshrc file:
     ++# '~/.zsh/' directory as '~/.zsh/_git' and then add the following to your
     ++# ~/.zshrc file:
       #
       #  fpath=(~/.zsh $fpath)
       

-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v3 1/1] doc: Change zsh git completion file name
  2019-10-15 18:48   ` [PATCH v3 0/1] doc: Add a note about ~/.zsh/_git file Max Belsky via GitGitGadget
@ 2019-10-15 18:48     ` Maxim Belsky via GitGitGadget
  2019-10-16  2:06       ` Junio C Hamano
  0 siblings, 1 reply; 13+ messages in thread
From: Maxim Belsky via GitGitGadget @ 2019-10-15 18:48 UTC (permalink / raw)
  To: git; +Cc: Max Belsky, Junio C Hamano, Maxim Belsky

From: Maxim Belsky <public.belsky@gmail.com>

The original comment does not describe type of ~/.zsh/_git explicitly
and zsh does not warn or fail if a user create it as a dictionary.
So unexperienced users could be misled by the original comment.

There is a small update to clarify it.

Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Maxim Belsky <public.belsky@gmail.com>
---
 contrib/completion/git-completion.zsh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
index 886bf95d1f..b480e3f316 100644
--- a/contrib/completion/git-completion.zsh
+++ b/contrib/completion/git-completion.zsh
@@ -11,8 +11,9 @@
 #
 #  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 make a copy of it in
+# '~/.zsh/' directory as '~/.zsh/_git' and then add the following to your
+# ~/.zshrc file:
 #
 #  fpath=(~/.zsh $fpath)
 
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v3 1/1] doc: Change zsh git completion file name
  2019-10-15 18:48     ` [PATCH v3 1/1] doc: Change zsh git completion file name Maxim Belsky via GitGitGadget
@ 2019-10-16  2:06       ` Junio C Hamano
  0 siblings, 0 replies; 13+ messages in thread
From: Junio C Hamano @ 2019-10-16  2:06 UTC (permalink / raw)
  To: Maxim Belsky via GitGitGadget; +Cc: git, Max Belsky

"Maxim Belsky via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Maxim Belsky <public.belsky@gmail.com>
> Subject: Re: [PATCH v3 1/1] doc: Change zsh git completion file name

Lack of attention to the detail.  This is not about changing the
filename anymore.

    Subject: [PATCH v3] completion: clarify installation instruction for zsh

perhaps.  I'll make the change locally, so unless there are other
changes you want to make, there is no need to resend.

Thanks.

> The original comment does not describe type of ~/.zsh/_git explicitly
> and zsh does not warn or fail if a user create it as a dictionary.
> So unexperienced users could be misled by the original comment.
>
> There is a small update to clarify it.
>
> Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
> Helped-by: Junio C Hamano <gitster@pobox.com>
> Helped-by: SZEDER Gábor <szeder.dev@gmail.com>
> Signed-off-by: Maxim Belsky <public.belsky@gmail.com>
> ---
>  contrib/completion/git-completion.zsh | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
> index 886bf95d1f..b480e3f316 100644
> --- a/contrib/completion/git-completion.zsh
> +++ b/contrib/completion/git-completion.zsh
> @@ -11,8 +11,9 @@
>  #
>  #  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 make a copy of it in
> +# '~/.zsh/' directory as '~/.zsh/_git' and then add the following to your
> +# ~/.zshrc file:
>  #
>  #  fpath=(~/.zsh $fpath)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 1/1] doc: Change zsh git completion file name
  2019-10-14 23:44     ` SZEDER Gábor
  2019-10-15  2:07       ` Junio C Hamano
@ 2020-10-25  3:40       ` Felipe Contreras
  1 sibling, 0 replies; 13+ messages in thread
From: Felipe Contreras @ 2020-10-25  3:40 UTC (permalink / raw)
  To: SZEDER Gábor
  Cc: Maxim Belsky via GitGitGadget, Git, Max Belsky, Junio C Hamano

On Tue, Oct 15, 2019 at 3:22 AM SZEDER Gábor <szeder.dev@gmail.com> wrote:

> Instructing users to copy our completion script to
> '~/.zsh/git-completion.zsh' goes against this convention.
>
> More importantly, it appears that this is more than a mere convention,
> maybe a requirement even; at least renaming our zsh completion script
> to follow the convention (IOW following the current install
> instructions) makes it work all of a sudden:

It is a requirement. If the file is not named '_git' it will never be
autoloaded. The whole point of naming it that way is that it's loaded
after typing 'git<tab>'.

-- 
Felipe Contreras

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-10-25  3:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-10 16:56 [PATCH 0/1] doc: Add a note about ~/.zsh/_git file Max Belsky via GitGitGadget
2019-10-10 16:56 ` [PATCH 1/1] doc: Change zsh git completion file name Maxim Belsky via GitGitGadget
2019-10-10 21:12   ` Johannes Schindelin
2019-10-11  5:57     ` Junio C Hamano
2019-10-11 17:54 ` [PATCH v2 0/1] doc: Add a note about ~/.zsh/_git file Max Belsky via GitGitGadget
2019-10-11 17:54   ` [PATCH v2 1/1] doc: Change zsh git completion file name Maxim Belsky via GitGitGadget
2019-10-12  1:35     ` Junio C Hamano
2019-10-14 23:44     ` SZEDER Gábor
2019-10-15  2:07       ` Junio C Hamano
2020-10-25  3:40       ` Felipe Contreras
2019-10-15 18:48   ` [PATCH v3 0/1] doc: Add a note about ~/.zsh/_git file Max Belsky via GitGitGadget
2019-10-15 18:48     ` [PATCH v3 1/1] doc: Change zsh git completion file name Maxim Belsky via GitGitGadget
2019-10-16  2:06       ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.