- _cvs(): assign to $changed() and $newremoved() as arrays, not scalars

This commit is contained in:
ianmacd 2002-03-01 07:55:36 +00:00
parent 0363d0203c
commit 8b8547237a

View File

@ -1,6 +1,6 @@
# bash_completion - some programmable completion functions for bash 2.05a # bash_completion - some programmable completion functions for bash 2.05a
# #
# $Id: bash_completion,v 1.170 2002/03/01 07:58:23 ianmacd Exp $ # $Id: bash_completion,v 1.171 2002/03/01 08:55:36 ianmacd Exp $
# #
# Copyright (C) Ian Macdonald <ian@caliban.org> # Copyright (C) Ian Macdonald <ian@caliban.org>
# #
@ -718,10 +718,10 @@ _cvs()
# this is the least computationally intensive way # this is the least computationally intensive way
# found so far, but other changes (something other than # found so far, but other changes (something other than
# changed/removed/new) may be missing # changed/removed/new) may be missing
changed=$( cvs diff --brief 2>&1 | \ changed=( $( cvs diff --brief 2>&1 | \
sed -ne 's/^Files [^ ]* and \([^ ]*\) differ$/\1/p' ) sed -ne 's/^Files [^ ]* and \([^ ]*\) differ$/\1/p' ) )
newremoved=$( cvs diff --brief 2>&1 | \ newremoved=( $( cvs diff --brief 2>&1 | \
sed -ne 's/^cvs diff: \([^ ]*\) .*, no comparison available$/\1/p' ) sed -ne 's/^cvs diff: \([^ ]*\) .*, no comparison available$/\1/p' ) )
COMPREPLY=( $( compgen -W '${changed[@]} \ COMPREPLY=( $( compgen -W '${changed[@]} \
${newremoved[@]}' -- $cur ) ) ${newremoved[@]}' -- $cur ) )
else else