cvs: Indentation fixes.

This commit is contained in:
Ville Skyttä 2011-05-24 08:41:00 +03:00
parent 08017ee3b2
commit c36b68c4c9

View File

@ -153,8 +153,8 @@ _cvs()
if [[ $cword -gt 1 && -r ${prefix:-}CVS/Entries ]]; then if [[ $cword -gt 1 && -r ${prefix:-}CVS/Entries ]]; then
get_entries get_entries
[ -z "$cur" ] && \ [ -z "$cur" ] && \
files=$( command ls -Ad !(CVS) ) || \ files=$( command ls -Ad !(CVS) ) || \
files=$( command ls -d ${cur}* 2>/dev/null ) files=$( command ls -d ${cur}* 2>/dev/null )
for i in "${entries[@]}"; do for i in "${entries[@]}"; do
files=( ${files[@]/#$i//} ) files=( ${files[@]/#$i//} )
done done
@ -235,16 +235,15 @@ _cvs()
# complete on remotely checked-out files (requires # complete on remotely checked-out files (requires
# passwordless access to the remote repository # passwordless access to the remote repository
if [ -n "${COMP_CVS_REMOTE:-}" ]; then if [ -n "${COMP_CVS_REMOTE:-}" ]; then
# this is the least computationally intensive # this is the least computationally intensive way found so
# way found so far, but other changes # far, but other changes (something other than
# (something other than changed/removed/new) # changed/removed/new) may be missing
# may be missing changed=( $( cvs -q diff --brief 2>&1 | \
changed=( $( cvs -q diff --brief 2>&1 | \ sed -ne 's/^Files [^ ]* and \([^ ]*\) differ$/\1/p' ) )
sed -ne 's/^Files [^ ]* and \([^ ]*\) differ$/\1/p' ) ) newremoved=( $( cvs -q diff --brief 2>&1 | \
newremoved=( $( cvs -q 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
COMPREPLY=( $(compgen -o default -- "$cur") ) COMPREPLY=( $(compgen -o default -- "$cur") )
fi fi