- define CVS helper functions outside of _cvs(), since that just parses them

at run-time anyway
This commit is contained in:
ianmacd 2002-05-02 22:43:50 +00:00
parent 6d6c1d2a5d
commit c93409198e

View File

@ -1,6 +1,6 @@
# bash_completion - some programmable completion functions for bash 2.05a
#
# $Id: bash_completion,v 1.293 2002/04/30 22:16:35 ianmacd Exp $
# $Id: bash_completion,v 1.294 2002/05/03 00:43:50 ianmacd Exp $
#
# Copyright (C) Ian Macdonald <ian@caliban.org>
#
@ -748,9 +748,7 @@ _ipsec()
# cvs(1) completion
#
have cvs &&
_cvs()
{
have cvs && {
set_prefix()
{
[ -z "$prefix" ] || prefix=${cur%/*}/
@ -759,8 +757,7 @@ _cvs()
get_entries()
{
entries=( $( cut -d/ -f2 -s ${prefix}CVS/Entries | \
grep "^$cur" ) )
entries=( $( cut -d/ -f2 -s ${prefix}CVS/Entries | grep "^$cur" ) )
}
get_modules()
@ -772,6 +769,8 @@ _cvs()
fi
}
_cvs()
{
local cur count mode i cvsroot pwd
local -a flags miss files entries changed newremoved
@ -955,6 +954,7 @@ _cvs()
return 0
}
[ "$have" ] && complete -F _cvs $default cvs
}
have rpm && {
# helper functions for rpm completion