From: Junio C Hamano Date: Wed, 7 Jan 2015 21:06:36 +0000 (-0800) Subject: Merge branch 'pd/completion-filenames-fix' X-Git-Tag: v2.3.0-rc0~21 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/e82f629cf40795e7780329f056fc3df2d6adc97b Merge branch 'pd/completion-filenames-fix' 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 --- e82f629cf40795e7780329f056fc3df2d6adc97b diff --cc contrib/completion/git-completion.bash index 23988ec124,865f31b66f..cd765795ae --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@@ -16,17 -17,15 +16,17 @@@ # # 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 ;; diff --cc contrib/completion/git-completion.zsh index 9f6f0fa558,1245bf4867..e25541308a --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@@ -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 # -# 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 () {