[Bash-completion-commits] [SCM] bash-completion branch, master, updated. eb5e62dec1119d8710368f844723900e2bdedfd4
Ville Skyttä
ville.skytta at iki.fi
Thu Oct 22 09:12:58 UTC 2009
The following commit has been merged in the master branch:
commit eb5e62dec1119d8710368f844723900e2bdedfd4
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Thu Oct 22 12:10:34 2009 +0300
Drop internal uses of $bash4 (definition still present though).
diff --git a/bash_completion b/bash_completion
index 49dddd8..99ce63a 100644
--- a/bash_completion
+++ b/bash_completion
@@ -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
--
bash-completion
More information about the Bash-completion-commits
mailing list