]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'pd/completion-filenames-fix'
authorJunio C Hamano <gitster@pobox.com>
Wed, 7 Jan 2015 21:06:36 +0000 (13:06 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 7 Jan 2015 21:06:37 +0000 (13:06 -0800)
The top-of-the-file instruction for completion scripts (in contrib/)
did not name the files correctly.

* pd/completion-filenames-fix:
  Update documentation occurrences of filename .sh

1  2 
contrib/completion/git-completion.bash
contrib/completion/git-completion.zsh

index 23988ec124a85d766006c6cd569c8341d3612c8b,865f31b66f932fa4356b6d004e85ee2eaa539afc..cd765795ae42edfdf21a054619b64d5c3800f4f6
  #
  # To use these routines:
  #
- #    1) Copy this file to somewhere (e.g. ~/.git-completion.sh).
+ #    1) Copy this file to somewhere (e.g. ~/.git-completion.bash).
  #    2) Add the following line to your .bashrc/.zshrc:
- #        source ~/.git-completion.sh
+ #        source ~/.git-completion.bash
  #    3) Consider changing your PS1 to also show the current branch,
  #       see git-prompt.sh for details.
 -
 -if [[ -n ${ZSH_VERSION-} ]]; then
 -      autoload -U +X bashcompinit && bashcompinit
 -fi
 +#
 +# If you use complex aliases of form '!f() { ... }; f', you can use the null
 +# command ':' as the first command in the function body to declare the desired
 +# completion style.  For example '!f() { : git commit ; ... }; f' will
 +# tell the completion to use commit completion.  This also works with aliases
 +# of form "!sh -c '...'".  For example, "!sh -c ': git commit ; ... '".
  
  case "$COMP_WORDBREAKS" in
  *:*) : great ;;
index 9f6f0fa5581002a2371e062fd5def0978733edc1,1245bf4867231ccf37f23c8c15fadfc952642cc1..e25541308a1c269285a26b205d2d9990a789060a
@@@ -2,19 -2,18 +2,19 @@@
  
  # zsh completion wrapper for git
  #
 -# You need git's bash completion script installed somewhere, by default on the
 -# same directory as this script.
 +# Copyright (c) 2012-2013 Felipe Contreras <felipe.contreras@gmail.com>
  #
 -# If your script is on ~/.git-completion.sh instead, you can configure it on
 -# your ~/.zshrc:
 +# You need git's bash completion script installed somewhere, by default it
 +# would be the location bash-completion uses.
 +#
 +# If your script is somewhere else, you can configure it on your ~/.zshrc:
  #
- #  zstyle ':completion:*:*:git:*' script ~/.git-completion.sh
+ #  zstyle ':completion:*:*:git:*' script ~/.git-completion.zsh
  #
 -# The recommended way to install this script is to copy to
 -# '~/.zsh/completion/_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/completion $fpath)
 +#  fpath=(~/.zsh $fpath)
  
  complete ()
  {