From ee60725dca378f8e928fc97cd67911d10538f52b Mon Sep 17 00:00:00 2001 From: ianmacd <> Date: Mon, 29 Apr 2002 18:21:41 +0000 Subject: [PATCH] - _cvs(): remove a superfluous grep and redirect stderr on ls - add PINE address-book completion --- bash_completion | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/bash_completion b/bash_completion index 755974fb..fa8b41a2 100644 --- a/bash_completion +++ b/bash_completion @@ -1,6 +1,6 @@ # bash_completion - some programmable completion functions for bash 2.05a # -# $Id: bash_completion,v 1.286 2002/04/27 18:45:24 ianmacd Exp $ +# $Id: bash_completion,v 1.287 2002/04/29 20:21:41 ianmacd Exp $ # # Copyright (C) Ian Macdonald # @@ -834,8 +834,8 @@ _cvs() if [ $COMP_CWORD -gt 1 -a -r ${prefix}CVS/Entries ]; then get_entries [ -z "$cur" ] && \ - files=$( \ls -A | grep -v '^CVS$' ) || \ - files=$( \ls -d ${cur}* ) + files=$( \ls -A !(CVS) ) || \ + files=$( \ls -d ${cur}* 2>/dev/null ) for i in ${entries[@]}; do files=( ${files[@]%$i} ) done @@ -2446,6 +2446,21 @@ _java() } [ "$have" ] && complete -F _java java +# PINE address-book completion +# +have pine && +_pineaddr() +{ + local cur + + COMPREPLY=() + cur=${COMP_WORDS[COMP_CWORD]} + + COMPREPLY=( $( compgen -W '$( awk '{print $1}' < ~/.addressbook )' \ + -- $cur ) ) +} +[ "$have" ] && complete -F _pineaddr $default pine + _configure_func() { local cur