[1/1] doc: Change zsh git completion file name
diff mbox series

Message ID ae00e1e3932b3364da68fa66e2ec5fbcce124bdc.1570726611.git.gitgitgadget@gmail.com
State New
Headers show
Series
  • doc: Add a note about ~/.zsh/_git file
Related show

Commit Message

Jonathan Gilbert via GitGitGadget Oct. 10, 2019, 4:56 p.m. UTC
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(-)

Comments

Johannes Schindelin Oct. 10, 2019, 9:12 p.m. UTC | #1
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
>
Junio C Hamano Oct. 11, 2019, 5:57 a.m. UTC | #2
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
>>

Patch
diff mbox series

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)