completion: 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.

Signed-off-by: Alexey <lesha.ogonkov@gmail.com>
Reviewed-by: Stefan Haller <lists@haller-berlin.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Alexey 2020-07-02 10:51:20 +00:00 committed by Junio C Hamano
parent a5fa49ff0a
commit 3ebd945735

View file

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