- _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.
This commit is contained in:
parent
c90a77f7eb
commit
3d1d2d9e18
@ -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 <ian@caliban.org>
|
||||
#
|
||||
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user