summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9a1fd65)
raw | patch | inline | side by side (parent: 9a1fd65)
author | SZEDER Gábor <szeder@ira.uka.de> | |
Fri, 3 Oct 2008 19:34:49 +0000 (21:34 +0200) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 6 Oct 2008 06:48:43 +0000 (23:48 -0700) |
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>
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>
contrib/completion/git-completion.bash | patch | blob | history |
index 3bc45f6b47837489f36e34b7af43f2be52838272..751e273e1aeecd382bc584fcb80b2ed6f52ed862 100755 (executable)
{
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=""
__gitcomp "$(__git_refs2 "$remote")"
;;
esac
- ;;
- esac
+ fi
}
_git_format_patch ()
{
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
__gitcomp "$(__git_refs)"
;;
esac
- ;;
- esac
+ fi
}
_git_rebase ()