From 3d1d2d9e184f7aba008c218e247663d71f7afc02 Mon Sep 17 00:00:00 2001 From: ianmacd <> Date: Tue, 5 Mar 2002 23:23:30 +0000 Subject: [PATCH] - _export() and _configure() default to default bash completion if all else fails - before sourcing ~/.bash_completion, check that the current file being sourced is not this very file. Otherwise, we cause an infinite loop. --- bash_completion | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bash_completion b/bash_completion index c834a581..6565f6d1 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.177 2002/03/04 16:33:30 ianmacd Exp $ +# $Id: bash_completion,v 1.178 2002/03/06 00:23:30 ianmacd Exp $ # # Copyright (C) Ian Macdonald # @@ -202,7 +202,7 @@ _export() ;; esac } -complete -F _export export +complete -F _export -o default export # bash shell function completion # @@ -2158,7 +2158,7 @@ _configure_func() COMPREPLY=( $( $1 --help | sed -ne 's|^ *\('$cur'[^ '$'\t'',[]\+\).*$|\1|p' ) ) } -complete -F _configure_func configure +complete -F _configure_func -o default configure _filedir_xspec() { @@ -2204,6 +2204,7 @@ fi unset list[@] # source user completion file -[ -f ~/.bash_completion ] && . ~/.bash_completion +[ $BASH_COMPLETION != ~/.bash_completion -a -r ~/.bash_completion ] \ + && . ~/.bash_completion unset -f have unset OS RELEASE have