emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/bash-completion 3e3d15e980 2/4: Clarify limitations of Bas


From: ELPA Syncer
Subject: [nongnu] elpa/bash-completion 3e3d15e980 2/4: Clarify limitations of Bash 4 support.
Date: Thu, 2 Mar 2023 14:59:52 -0500 (EST)

branch: elpa/bash-completion
commit 3e3d15e9808d7ee3d2c77adae32631ec4468c14a
Author: Stephane Zermatten <szermatt@gmx.net>
Commit: Stephane Zermatten <stephane@fuzzy.zia>

    Clarify limitations of Bash 4 support.
    
    Bash 4.0 and 4.1 aren't supported. Bash 4.2 and 4.2 are supported with
    limitations. Bash 4.4 and later are fully supported.
    
    See issue #64
---
 README.md          |  7 +++++--
 bash-completion.el | 16 +++++++++++-----
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/README.md b/README.md
index bec14965e6..b51234e66d 100644
--- a/README.md
+++ b/README.md
@@ -125,7 +125,10 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for more details.
 
 ## COMPATIBILITY
 
-bash-completion.el is known to work with Bash 4 and 5, on Emacs,
-starting with version 25.3, under Linux and OSX.
+bash-completion.el is known to work with Bash 4.2 and later and Bash
+5, on Emacs, starting with version 25.3, under Linux and OSX. 
+
+Support for Bash 4.2 and 4.3 is incomplete: appending / to directories
+doesn't work. Consider upgrading to at least Bash 4.4.
 
 [new_issue]: https://github.com/szermatt/emacs-bash-completion/issues/new
diff --git a/bash-completion.el b/bash-completion.el
index db64f9066c..af3508d862 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -99,9 +99,11 @@
 
 ;;; Compatibility:
 
-;; bash-completion.el is known to work with Bash 4 and 5, on Emacs,
-;; starting with version 25.3, under Linux and OSX. It does not work
-;; on XEmacs.
+;; bash-completion.el is known to work with Bash 4.2 and later and
+;; Bash 5, on Emacs, starting with version 25.3, under Linux and OSX.
+;;
+;; Support for Bash 4.2 and 4.3 is incomplete: appending / to
+;; directories doesn't work. Consider upgrading to at least Bash 4.4.
 
 ;;; History:
 
@@ -369,8 +371,12 @@ returned."
 (defun bash-completion--setup-bash-common (process)
   "Setup PROCESS to be ready for completion."
   (unless (zerop
-           (bash-completion-send "echo -n $BASH_VERSION ; [[ 
${BASH_VERSINFO[0]} -ge 4 ]]" process))
-    (error "bash-completion.el requires at least Bash 4, not %s."
+           (bash-completion-send
+            (concat
+             "echo -n $BASH_VERSION ; "
+             "[[ ${BASH_VERSINFO[0]} -gt 4 || ( ${BASH_VERSINFO[0]} = 4 && 
${BASH_VERSINFO[1]} -ge 2 ) ]]")
+            process))
+    (error "bash-completion.el requires at least Bash 4.2, not %s."
            (with-current-buffer (bash-completion--get-buffer process)
              (buffer-substring-no-properties
               (point-min) (point-max)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]