summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder@ira.uka.de>2008-03-10 15:02:22 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2008-03-10 23:45:20 (GMT)
commit1d17b22ebf9d894cef393e3e062f383aad8817e8 (patch)
tree88ee1f437230a2f5bba7e84c8572a5950809b057
parenta5c4f85b1685aeb01f4dac88075f465c71a6c82d (diff)
downloadgit-1d17b22ebf9d894cef393e3e062f383aad8817e8.zip
git-1d17b22ebf9d894cef393e3e062f383aad8817e8.tar.gz
git-1d17b22ebf9d894cef393e3e062f383aad8817e8.tar.bz2
bash: remove unnecessary conditions when checking for subcommands
Checking emptyness of $command is sufficient. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rwxr-xr-xcontrib/completion/git-completion.bash8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index c29569c..a94dc88 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -497,7 +497,7 @@ _git_bisect ()
c=$((++c))
done
- if [ $c -eq $COMP_CWORD -a -z "$command" ]; then
+ if [ -z "$command" ]; then
__gitcomp "start bad good reset visualize replay log"
return
fi
@@ -1042,7 +1042,7 @@ _git_remote ()
c=$((++c))
done
- if [ $c -eq $COMP_CWORD -a -z "$command" ]; then
+ if [ -z "$command" ]; then
__gitcomp "add rm show prune update"
return
fi
@@ -1135,7 +1135,7 @@ _git_submodule ()
c=$((++c))
done
- if [ $c -eq $COMP_CWORD -a -z "$command" ]; then
+ if [ -z "$command" ]; then
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
--*)
@@ -1198,7 +1198,7 @@ _git ()
c=$((++c))
done
- if [ $c -eq $COMP_CWORD -a -z "$command" ]; then
+ if [ -z "$command" ]; then
case "${COMP_WORDS[COMP_CWORD]}" in
--*=*) COMPREPLY=() ;;
--*) __gitcomp "