- fix cvs counting bug
(patch by "C. Scott Ananian" <cananian@lesser-magoo.lcs.mit.edu>
This commit is contained in:
parent
d6089cccc2
commit
38ccef1739
@ -1,6 +1,6 @@
|
|||||||
# bash_completion - some programmable completion functions for bash 2.05b
|
# bash_completion - some programmable completion functions for bash 2.05b
|
||||||
#
|
#
|
||||||
# $Id: bash_completion,v 1.425 2002/10/05 09:31:43 ianmacd Exp $
|
# $Id: bash_completion,v 1.426 2002/10/05 09:33:14 ianmacd Exp $
|
||||||
#
|
#
|
||||||
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||||
#
|
#
|
||||||
@ -1002,13 +1002,13 @@ _cvs()
|
|||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur=${COMP_WORDS[COMP_CWORD]}
|
cur=${COMP_WORDS[COMP_CWORD]}
|
||||||
|
|
||||||
count=1
|
count=0
|
||||||
for i in ${COMP_WORDS[@]}; do
|
for i in ${COMP_WORDS[@]}; do
|
||||||
[ $count -eq $COMP_CWORD ] && break
|
[ $count -eq $COMP_CWORD ] && break
|
||||||
if [ -z "$mode" ]; then
|
if [ -z "$mode" ]; then
|
||||||
case $i in
|
case $i in
|
||||||
-d)
|
-d)
|
||||||
cvsroot=${COMP_WORDS[((++count))]}
|
cvsroot=${COMP_WORDS[((count+1))]}
|
||||||
;;
|
;;
|
||||||
@(add|new))
|
@(add|new))
|
||||||
mode=add
|
mode=add
|
||||||
@ -1043,7 +1043,6 @@ _cvs()
|
|||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
continue
|
|
||||||
elif [[ "$i" = -* ]]; then
|
elif [[ "$i" = -* ]]; then
|
||||||
flags=( ${flags[@]} $i )
|
flags=( ${flags[@]} $i )
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user