completion: bash: remove zsh wrapper

It has been deprecated for more than eight years now, it's never up to date, and it's a hassle to maintain. It's time to move on. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Felipe Contreras committed Oct 27, 2020 at 20:06 UTC 162f1a5610fa4de331207c84a8c281088486e5a7
1 file changed +2 -90
contrib/completion/git-completion.bash
+2 -90
@@ -3458,96 +3458,8 @@ __gitk_main ()
3458 __git_complete_revlist
3459 }
3460
3461 -if [[ -n ${ZSH_VERSION-} ]] &&
3462 - # Don't define these functions when sourced from 'git-completion.zsh',
3463 - # it has its own implementations.
3464 - [[ -z ${GIT_SOURCING_ZSH_COMPLETION-} ]]; then
3465 - echo "WARNING: this script is deprecated, please see git-completion.zsh" 1>&2
3466 -
3467 - autoload -U +X compinit && compinit
3468 -
3469 - __gitcomp ()
3470 - {
3471 - emulate -L zsh
3472 -
3473 - local cur_="${3-$cur}"
3474 -
3475 - case "$cur_" in
3476 - --*=)
3477 - ;;
3478 - *)
3479 - local c IFS=$' \t\n'
3480 - local -a array
3481 - for c in ${=1}; do
3482 - c="$c${4-}"
3483 - case $c in
3484 - --*=*|*.) ;;
3485 - *) c="$c " ;;
3486 - esac
3487 - array[${#array[@]}+1]="$c"
3488 - done
3489 - compset -P '*[=:]'
3490 - compadd -Q -S '' -p "${2-}" -a -- array && _ret=0
3491 - ;;
3492 - esac
3493 - }
3494 -
3495 - __gitcomp_direct ()
3496 - {
3497 - emulate -L zsh
3498 -
3499 - local IFS=$'\n'
3500 - compset -P '*[=:]'
3501 - compadd -Q -- ${${=1}% } && _ret=0
3502 - }
3503 -
3504 - __gitcomp_nl ()
3505 - {
3506 - emulate -L zsh
3507 -
3508 - local IFS=$'\n'
3509 - compset -P '*[=:]'
3510 - compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0
3511 - }
3512 -
3513 - __gitcomp_nl_append ()
3514 - {
3515 - emulate -L zsh
3516 -
3517 - local IFS=$'\n'
3518 - compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0
3519 - }
3520 -
3521 - __gitcomp_file_direct ()
3522 - {
3523 - emulate -L zsh
3524 -
3525 - local IFS=$'\n'
3526 - compset -P '*[=:]'
3527 - compadd -f -- ${=1} && _ret=0
3528 - }
3529 -
3530 - __gitcomp_file ()
3531 - {
3532 - emulate -L zsh
3533 -
3534 - local IFS=$'\n'
3535 - compset -P '*[=:]'
3536 - compadd -p "${2-}" -f -- ${=1} && _ret=0
3537 - }
3538 -
3539 - _git ()
3540 - {
3541 - local _ret=1 cur cword prev
3542 - cur=${words[CURRENT]}
3543 - prev=${words[CURRENT-1]}
3544 - let cword=CURRENT-1
3545 - emulate ksh -c __${service}_main
3546 - let _ret && _default && _ret=0
3547 - return _ret
3548 - }
3549 -
3550 - compdef _git git gitk
3461 +if [[ -n ${ZSH_VERSION-} && -z ${GIT_SOURCING_ZSH_COMPLETION-} ]]; then
3462 + echo "ERROR: this script is obsolete, please see git-completion.zsh" 1>&2
3463 return
3464 fi
3465