[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/bash-completion 5931a2ba43 037/313: completion-fix
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/bash-completion 5931a2ba43 037/313: completion-fix |
Date: |
Sat, 3 Dec 2022 10:59:13 -0500 (EST) |
branch: elpa/bash-completion
commit 5931a2ba43cefd037df250be1e7c8bd08ba90c5a
Author: Stephane Zermatten <szermatt@gmx.net>
Commit: Stephane Zermatten <szermatt@gmx.net>
completion-fix
---
bash-completion.el | 4 ++--
bash-completion_test.el | 20 ++++++++++++++++++++
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/bash-completion.el b/bash-completion.el
index bae4f7f446..d32a74c1a4 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -188,7 +188,7 @@ The result is a list of candidates, which might be empty."
(defun bash-completion-fix (str &optional prefix)
(let ((prefix (or prefix bash-completion-prefix))
(suffix ""))
- (bash-completion-addsuffix
+ (bash-completion-addsuffix
(let* ((rebuilt)
(rest (cond
((bash-completion-starts-with str prefix)
@@ -202,7 +202,7 @@ The result is a list of candidates, which might be empty."
;; bash sometimes just prints whatever needs to be expanded,
;; for example: "export PATH=<complete>". Prepend the old
;; prefix to avoid confusing comint-dynamic-simple-complete
- ((bash-completion-starts-with
+ ((bash-completion-starts-with
(setq rebuilt (concat
(bash-completion-before-last-wordbreak prefix) str))
prefix)
(substring rebuilt (length prefix)))
diff --git a/bash-completion_test.el b/bash-completion_test.el
index d526ed5797..93acddee21 100644
--- a/bash-completion_test.el
+++ b/bash-completion_test.el
@@ -380,6 +380,26 @@ garbage
(bash-completion-after-last-wordbreak "hello"))
'("e" "world" "world" "hello"))
+ ("bash-completion-fix escape rest"
+ (bash-completion-fix "a\\ bc d e" "a\\ b")
+ "a\\ bc\\ d\\ e")
+
+ ("bash-completion-fix do not escape final space"
+ (bash-completion-fix "ab " "a")
+ "ab ")
+
+ ("bash-completion-fix unexpand home and escape"
+ (bash-completion-fix (expand-file-name "~/a/hello world") "~/a/he")
+ "~/a/hello\\ world")
+
+ ("bash-completion-fix match after wordbreak and escape"
+ (bash-completion-fix "hello world" "a:b:c:he")
+ "a:b:c:hello\\ world")
+
+ ("bash-completion-fix just append"
+ (bash-completion-fix " world" "hello")
+ "hello\\ world")
+
))
;; ---------- integration tests
- [nongnu] elpa/bash-completion f7bfc68ea2 001/313: bash completion, (continued)
- [nongnu] elpa/bash-completion f7bfc68ea2 001/313: bash completion, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion f5885ec87a 002/313: test case for bash-complete, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 208cb5ab76 007/313: Join, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 47a890dd72 010/313: launch process, send commands, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 53f2c5d30e 009/313: parse complete -p output, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 11e52fce6f 018/313: Fixed initialization, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion c10cfef5b8 015/313: complex line split, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion b5c2fbf4a2 014/313: add hooks, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 9eb026ae0b 025/313: fixed current directory for adding slash, workaround for bash ~ expansion, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 02d1acf260 030/313: wordbreaks, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 5931a2ba43 037/313: completion-fix,
ELPA Syncer <=
- [nongnu] elpa/bash-completion a78fd6b587 044/313: turn off mailwarn and checkjobs, continue if this failed, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 0ffaad3ef0 035/313: wordbreak-split, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 80cd654c35 043/313: turn off mailwarn and checkjobs, continue if this failed, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 1c6b2efb67 040/313: enormous test, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion fc96b621e2 034/313: pass all tests in bash-completion, new test for -send, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion e77c841dac 107/313: Merge pull request #3 from seanmcl/master, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 062acfab3e 052/313: updated documentation, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 75e5de1494 066/313: fix initial completion, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion ffe8bc46a2 097/313: Ignore 'cd' stdout, in case someone (like me) is crazy enough to override the builtin command, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion b1ff763566 104/313: Clear PROMPT_COMMAND when creating bash process, ELPA Syncer, 2022/12/03