Drop compgen/complete option and bash version related global variables.
This commit is contained in:
parent
d062d3b570
commit
f1b3be2357
6
CHANGES
6
CHANGES
@ -25,7 +25,11 @@ bash-completion (2.x)
|
|||||||
* Speed up installed rpm package completion on SUSE, based on work by
|
* Speed up installed rpm package completion on SUSE, based on work by
|
||||||
Marco Poletti (Alioth: #312021).
|
Marco Poletti (Alioth: #312021).
|
||||||
* Improve sourcing snippets from completion dirs.
|
* Improve sourcing snippets from completion dirs.
|
||||||
* Drop support for bash < 3.
|
* Drop support for bash < 3. The compatiblity global variables $bashN,
|
||||||
|
$default, $dirnames, $filenames, $compopt, $nospace, $bashdefault, and
|
||||||
|
$plusdirs have been dropped too. 3rd party completions should switch
|
||||||
|
to using the complete/compgen features directly, and BASH_VERSINFO
|
||||||
|
for bash version checks.
|
||||||
* Fix sed error in qdbus completions containing slashes (Debian: 552631).
|
* Fix sed error in qdbus completions containing slashes (Debian: 552631).
|
||||||
* Add /sbin to $PATH when invoking ifconfig and iwconfig.
|
* Add /sbin to $PATH when invoking ifconfig and iwconfig.
|
||||||
|
|
||||||
|
@ -56,25 +56,6 @@ case ${UNAME} in
|
|||||||
*) USERLAND=${UNAME} ;;
|
*) USERLAND=${UNAME} ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# features supported by bash 2.05 and higher
|
|
||||||
declare -r bash205=$BASH_VERSION 2>/dev/null || :
|
|
||||||
default="-o default"
|
|
||||||
dirnames="-o dirnames"
|
|
||||||
filenames="-o filenames"
|
|
||||||
compopt=:
|
|
||||||
# features supported by bash 2.05b and higher
|
|
||||||
declare -r bash205b=$BASH_VERSION 2>/dev/null || :
|
|
||||||
nospace="-o nospace"
|
|
||||||
# features supported by bash 3.0 and higher
|
|
||||||
declare -r bash3=$BASH_VERSION 2>/dev/null || :
|
|
||||||
bashdefault="-o bashdefault"
|
|
||||||
plusdirs="-o plusdirs"
|
|
||||||
# features supported by bash 4.0 and higher
|
|
||||||
if [ ${BASH_VERSINFO[0]} -gt 3 ]; then
|
|
||||||
declare -r bash4=$BASH_VERSION 2>/dev/null || :
|
|
||||||
compopt=compopt
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Turn on extended globbing and programmable completion
|
# Turn on extended globbing and programmable completion
|
||||||
shopt -s extglob progcomp
|
shopt -s extglob progcomp
|
||||||
|
|
||||||
@ -1689,8 +1670,7 @@ unset i
|
|||||||
[ $BASH_COMPLETION != ~/.bash_completion -a -r ~/.bash_completion ] \
|
[ $BASH_COMPLETION != ~/.bash_completion -a -r ~/.bash_completion ] \
|
||||||
&& . ~/.bash_completion
|
&& . ~/.bash_completion
|
||||||
unset -f have
|
unset -f have
|
||||||
unset UNAME USERLAND default dirnames filenames have nospace bashdefault \
|
unset UNAME USERLAND have
|
||||||
plusdirs compopt
|
|
||||||
|
|
||||||
set $BASH_COMPLETION_ORIGINAL_V_VALUE
|
set $BASH_COMPLETION_ORIGINAL_V_VALUE
|
||||||
unset BASH_COMPLETION_ORIGINAL_V_VALUE
|
unset BASH_COMPLETION_ORIGINAL_V_VALUE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user