[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 8775d682f75b7715de38592489c52aadf90e614a
Ville Skyttä
ville.skytta at iki.fi
Tue Apr 7 18:01:27 UTC 2009
The following commit has been merged in the master branch:
commit 4475d3634923de7a169c67aaa197f388bb418de8
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Tue Apr 7 20:58:35 2009 +0300
Declare $bash4, use it in quote_readline().
diff --git a/bash_completion b/bash_completion
index 16bd2e6..31af0c9 100644
--- a/bash_completion
+++ b/bash_completion
@@ -74,6 +74,10 @@ if [ ${BASH_VERSINFO[0]} -gt 2 ]; then
bashdefault="-o bashdefault"
plusdirs="-o plusdirs"
fi
+# features supported by bash 4.0 and higher
+if [ ${BASH_VERSINFO[0]} -gt 3 ]; then
+ declare -r bash4=$BASH_VERSION 2>/dev/null || :
+fi
# Turn on extended globbing and programmable completion
shopt -s extglob progcomp
@@ -209,7 +213,7 @@ quote()
# results in the original argument
quote_readline()
{
- if [[ "${BASH_VERSINFO[0]}" -ge 4 ]] ; then
+ if [ -n "$bash4" ] ; 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}"
--
bash-completion
More information about the Bash-completion-commits
mailing list