Drop internal uses of $bash4 (definition still present though).

This commit is contained in:
Ville Skyttä 2009-10-22 12:10:34 +03:00
parent 885e6dd6b6
commit eb5e62dec1

View File

@ -211,7 +211,7 @@ quote()
# results in the original argument
quote_readline()
{
if [ -n "$bash4" ] ; then
if [ ${BASH_VERSINFO[0]} -ge 4 ]; then
# This function isn't really necessary on bash 4
# See: http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00155.html
echo "${1}"
@ -240,7 +240,7 @@ dequote()
_get_cword()
{
if [ -n "$bash4" ] ; then
if [ ${BASH_VERSINFO[0]} -ge 4 ] ; then
__get_cword4 "$@"
else
__get_cword3
@ -262,7 +262,7 @@ _get_cword()
# _get_cword, main routine
# __get_cword4, bash-4 variant
#
[ -z "$bash4" ] &&
[ ${BASH_VERSINFO[0]} -lt 4 ] &&
__get_cword3()
{
if [[ "${#COMP_WORDS[COMP_CWORD]}" -eq 0 ]] || [[ "$COMP_POINT" == "${#COMP_LINE}" ]]; then
@ -325,7 +325,7 @@ __get_cword3()
# _get_cword, main routine
# __get_cword3, bash-3 variant
#
[ -n "$bash4" ] &&
[ ${BASH_VERSINFO[0]} -ge 4 ] &&
__get_cword4()
{
local i