summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder@ira.uka.de>2008-10-03 19:34:49 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2008-10-06 06:48:43 (GMT)
commit5a625b07bbff709037f26be1c393337b6d9e103f (patch)
tree7fcd3ab21e684b311b3e6e7c70efd0988b53a703
parent9a1fd653b13b6cc136bfa5b9563f629b2af1a6c8 (diff)
downloadgit-5a625b07bbff709037f26be1c393337b6d9e103f.zip
git-5a625b07bbff709037f26be1c393337b6d9e103f.tar.gz
git-5a625b07bbff709037f26be1c393337b6d9e103f.tar.bz2
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>
-rwxr-xr-xcontrib/completion/git-completion.bash36
1 files changed, 9 insertions, 27 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 3bc45f6..751e273 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -799,14 +799,9 @@ _git_fetch ()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
- case "${COMP_WORDS[0]},$COMP_CWORD" in
- git-fetch*,1)
+ if [ "$COMP_CWORD" = 2 ]; then
__gitcomp "$(__git_remotes)"
- ;;
- git,2)
- __gitcomp "$(__git_remotes)"
- ;;
- *)
+ else
case "$cur" in
*:*)
local pfx=""
@@ -825,8 +820,7 @@ _git_fetch ()
__gitcomp "$(__git_refs2 "$remote")"
;;
esac
- ;;
- esac
+ fi
}
_git_format_patch ()
@@ -1063,36 +1057,25 @@ _git_pull ()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
- case "${COMP_WORDS[0]},$COMP_CWORD" in
- git-pull*,1)
- __gitcomp "$(__git_remotes)"
- ;;
- git,2)
+ if [ "$COMP_CWORD" = 2 ]; then
__gitcomp "$(__git_remotes)"
- ;;
- *)
+ else
local remote
case "${COMP_WORDS[0]}" in
git-pull) remote="${COMP_WORDS[1]}" ;;
git) remote="${COMP_WORDS[2]}" ;;
esac
__gitcomp "$(__git_refs "$remote")"
- ;;
- esac
+ fi
}
_git_push ()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
- case "${COMP_WORDS[0]},$COMP_CWORD" in
- git-push*,1)
- __gitcomp "$(__git_remotes)"
- ;;
- git,2)
+ if [ "$COMP_CWORD" = 2 ]; then
__gitcomp "$(__git_remotes)"
- ;;
- *)
+ else
case "$cur" in
*:*)
local remote
@@ -1116,8 +1099,7 @@ _git_push ()
__gitcomp "$(__git_refs)"
;;
esac
- ;;
- esac
+ fi
}
_git_rebase ()