From e450032829ad7d7e13b65e9b5524a1df24a3374e Mon Sep 17 00:00:00 2001 From: ianmacd <> Date: Thu, 28 Feb 2002 22:37:10 +0000 Subject: [PATCH] - _cd() was not correctly completing on subdirs of $CDPATH (why is this function so damn hard to get right? :-) ) - _configure() suffered a sed error when completing on options of the type --option=PATH --- bash_completion | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bash_completion b/bash_completion index 8b6f28a4..0abc9f34 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.166 2002/02/28 23:23:14 ianmacd Exp $ +# $Id: bash_completion,v 1.167 2002/02/28 23:37:10 ianmacd Exp $ # # Copyright (C) Ian Macdonald # @@ -1517,6 +1517,7 @@ _cd() return 0 fi if [ -n "$CDPATH" ]; then + IFS=$'\t' # we have a CDPATH, so loop on its contents for i in ${CDPATH//:/$'\t'}; do # create an array of matched subdirs @@ -2092,7 +2093,7 @@ _configure_func() [[ "$cur" != -* ]] && return 0 - COMPREPLY=( $( $1 --help | sed -ne 's/^ *\('$cur'[^ '$'\t'',[]\+\).*$/\1/p' ) ) + COMPREPLY=( $( $1 --help | sed -ne 's|^ *\('$cur'[^ '$'\t'',[]\+\).*$|\1|p' ) ) } complete -F _configure_func configure