bash: remove fetch, push, pull dashed form leftovers

We don't provide complation for git-commands in dashed form anymore,
so there is no need to keep those cases.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Tested-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
SZEDER Gábor 2008-10-03 21:34:49 +02:00 committed by Shawn O. Pearce
parent 9a1fd653b1
commit 5a625b07bb

View File

@ -799,14 +799,9 @@ _git_fetch ()
{ {
local cur="${COMP_WORDS[COMP_CWORD]}" local cur="${COMP_WORDS[COMP_CWORD]}"
case "${COMP_WORDS[0]},$COMP_CWORD" in if [ "$COMP_CWORD" = 2 ]; then
git-fetch*,1)
__gitcomp "$(__git_remotes)" __gitcomp "$(__git_remotes)"
;; else
git,2)
__gitcomp "$(__git_remotes)"
;;
*)
case "$cur" in case "$cur" in
*:*) *:*)
local pfx="" local pfx=""
@ -825,8 +820,7 @@ _git_fetch ()
__gitcomp "$(__git_refs2 "$remote")" __gitcomp "$(__git_refs2 "$remote")"
;; ;;
esac esac
;; fi
esac
} }
_git_format_patch () _git_format_patch ()
@ -1063,36 +1057,25 @@ _git_pull ()
{ {
local cur="${COMP_WORDS[COMP_CWORD]}" local cur="${COMP_WORDS[COMP_CWORD]}"
case "${COMP_WORDS[0]},$COMP_CWORD" in if [ "$COMP_CWORD" = 2 ]; then
git-pull*,1)
__gitcomp "$(__git_remotes)" __gitcomp "$(__git_remotes)"
;; else
git,2)
__gitcomp "$(__git_remotes)"
;;
*)
local remote local remote
case "${COMP_WORDS[0]}" in case "${COMP_WORDS[0]}" in
git-pull) remote="${COMP_WORDS[1]}" ;; git-pull) remote="${COMP_WORDS[1]}" ;;
git) remote="${COMP_WORDS[2]}" ;; git) remote="${COMP_WORDS[2]}" ;;
esac esac
__gitcomp "$(__git_refs "$remote")" __gitcomp "$(__git_refs "$remote")"
;; fi
esac
} }
_git_push () _git_push ()
{ {
local cur="${COMP_WORDS[COMP_CWORD]}" local cur="${COMP_WORDS[COMP_CWORD]}"
case "${COMP_WORDS[0]},$COMP_CWORD" in if [ "$COMP_CWORD" = 2 ]; then
git-push*,1)
__gitcomp "$(__git_remotes)" __gitcomp "$(__git_remotes)"
;; else
git,2)
__gitcomp "$(__git_remotes)"
;;
*)
case "$cur" in case "$cur" in
*:*) *:*)
local remote local remote
@ -1116,8 +1099,7 @@ _git_push ()
__gitcomp "$(__git_refs)" __gitcomp "$(__git_refs)"
;; ;;
esac esac
;; fi
esac
} }
_git_rebase () _git_rebase ()