[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/bash-completion 0f3f8c22b4 146/313: Add a space after a si
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/bash-completion 0f3f8c22b4 146/313: Add a space after a single custom completion. |
Date: |
Sat, 3 Dec 2022 10:59:25 -0500 (EST) |
branch: elpa/bash-completion
commit 0f3f8c22b438f1e36e05bc65965231ddc192863c
Author: Stephane Zermatten <szermatt@gmx.net>
Commit: Stephane Zermatten <szermatt@gmx.net>
Add a space after a single custom completion.
Before this commit, bash-completion.el only added a space when there was
one completion candidate for default completion. This commit enables
that behavior for custom completion.
No space should be added when the completion ends with a special
character, such as =, for command-line arguments or /, for directories.
---
bash-completion-test.el | 31 +++++++++++++++++++++++++++++++
bash-completion.el | 2 +-
2 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/bash-completion-test.el b/bash-completion-test.el
index 64a902e1cf..a9f18d6b71 100644
--- a/bash-completion-test.el
+++ b/bash-completion-test.el
@@ -876,4 +876,35 @@ before calling `bash-completion-dynamic-complete-nocomint'.
(equal '(17 20 ("./world "))
(bash-completion-dynamic-complete-nocomint 3 (point))))))
+(ert-deftest bash-completion-single-custom-completion ()
+ (--with-fake-bash-completion-send
+ (setq bash-completion-alist '(("ls" "compgen" "args")))
+ (push "--escape\n" --send-results)
+ (insert "$ ls --esc")
+ (let ((bash-completion-nospace nil))
+ (should (equal
+ '("--escape ")
+ (nth 2 (bash-completion-dynamic-complete-nocomint 3
(point))))))))
+
+(ert-deftest bash-completion-single-custom-completion-with-wordbreak-end ()
+ (--with-fake-bash-completion-send
+ (setq bash-completion-alist '(("ls" "compgen" "args")))
+ (push "--color=\n" --send-results)
+ (insert "$ ls --col")
+ (let ((bash-completion-nospace nil))
+ (should (equal
+ '("--color=")
+ (nth 2 (bash-completion-dynamic-complete-nocomint 3
(point))))))))
+
+(ert-deftest bash-completion-single-custom-completion-as-directory ()
+ (--with-fake-bash-completion-send
+ (setq bash-completion-alist '(("ls" "compgen" "args")))
+ (push "somedir/\n" --send-results)
+ (insert "$ ls some")
+ (let ((bash-completion-nospace nil))
+ (should (equal
+ '("somedir/")
+ (nth 2 (bash-completion-dynamic-complete-nocomint 3
(point))))))))
+
+
;;; bash-completion_test.el ends here
diff --git a/bash-completion.el b/bash-completion.el
index 9457499925..6b644bcbf2 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -816,7 +816,7 @@ for directory name detection to work."
(setq suffix "/"))
((and (not open-quote)
(or (eq completion-type 'command)
- (and (memq completion-type '(default wordbreak))
+ (and (memq completion-type '(default wordbreak custom))
single)))
(setq suffix (if bash-completion-nospace "" " ")))))
- [nongnu] elpa/bash-completion db0545f469 093/313: Add a markdown README file, (continued)
- [nongnu] elpa/bash-completion db0545f469 093/313: Add a markdown README file, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 3eb77ec9c4 086/313: Moved shell configuration into config. Got rid of */init.el, going, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion abeee42e65 112/313: Set comint-completion-addsuffix again in pre-emacs-24.1 mode., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 920bbc25bf 121/313: Run integration tests successfully on system where "hel" expand to more, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion bac0fb55f1 124/313: More integration test cleanup made possible by the move to ert., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion b49dbe1457 127/313: Don't require obsolete and unused cl., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 0af9a70ff9 130/313: Merge pull request #16 from tarsius/master, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion d673bf1ed0 132/313: Merge pull request #17 from svend/bash-flags, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 1659c7ca38 126/313: Quoting fix: fix parentheses in a file name, improve double quoting within, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 432c2d15c9 142/313: Add a space after the completion candidate for single completion., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 0f3f8c22b4 146/313: Add a space after a single custom completion.,
ELPA Syncer <=
- [nongnu] elpa/bash-completion eacb8061e3 147/313: Fallback to filename completion when custom completion didn't find, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 081d03bedc 156/313: Fix issue #21 completion bug, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 1c2153d287 159/313: Call make-obsolete with three arguments, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 7965b914da 160/313: Re-enable directory expansion for custom completion. fixes #23, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 2c0b8d6a6e 163/313: Merge pull request #27 from vorburger/patch-1, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 0c77c64b50 174/313: Disable bash-completion-enable-caching if completion-table-with-cache, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion b281e1e181 008/313: bash-complete-add-to-alist, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 1144ae69a9 056/313: documented the tokenizer, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 376dd532e2 057/313: modre documentation, up until wordbreak, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion fd7e0e6fbe 078/313: added documentation, ELPA Syncer, 2022/12/03