- _cvs(): assign to $changed() and $newremoved() as arrays, not scalars
This commit is contained in:
parent
0363d0203c
commit
8b8547237a
@ -1,6 +1,6 @@
|
||||
# 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>
|
||||
#
|
||||
@ -718,10 +718,10 @@ _cvs()
|
||||
# this is the least computationally intensive way
|
||||
# found so far, but other changes (something other than
|
||||
# changed/removed/new) may be missing
|
||||
changed=$( cvs diff --brief 2>&1 | \
|
||||
sed -ne 's/^Files [^ ]* and \([^ ]*\) differ$/\1/p' )
|
||||
newremoved=$( cvs diff --brief 2>&1 | \
|
||||
sed -ne 's/^cvs diff: \([^ ]*\) .*, no comparison available$/\1/p' )
|
||||
changed=( $( cvs diff --brief 2>&1 | \
|
||||
sed -ne 's/^Files [^ ]* and \([^ ]*\) differ$/\1/p' ) )
|
||||
newremoved=( $( cvs diff --brief 2>&1 | \
|
||||
sed -ne 's/^cvs diff: \([^ ]*\) .*, no comparison available$/\1/p' ) )
|
||||
COMPREPLY=( $( compgen -W '${changed[@]} \
|
||||
${newremoved[@]}' -- $cur ) )
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user