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

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

[nongnu] elpa/bash-completion 3f86d75644 064/313: Trim strange results t


From: ELPA Syncer
Subject: [nongnu] elpa/bash-completion 3f86d75644 064/313: Trim strange results that are a subset of the current value
Date: Sat, 3 Dec 2022 10:59:17 -0500 (EST)

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

    Trim strange results that are a subset of the current value
---
 bash-completion.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/bash-completion.el b/bash-completion.el
index 3419ffb127..8490821400 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -577,6 +577,12 @@ for directory name detection to work."
                         (bash-completion-starts-with str (expand-file-name 
"~")))
                    (substring (concat "~" (substring str (length 
(expand-file-name "~"))))
                               (length prefix)))
+                  ((bash-completion-starts-with prefix str)
+                   ;; completion is a substring of prefix something's
+                   ;; gone wrong. Treat it as one (useless)
+                   ;; candidate.
+                   (setq prefix "")
+                   (setq rest str))
                   ;; completion sometimes only applies to the last word, as
                   ;; defined by COMP_WORDBREAKS. This detects and works around
                   ;; this feature.



reply via email to

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