[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/bash-completion 6aedd69000 164/313: Delete duplicates when
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/bash-completion 6aedd69000 164/313: Delete duplicates when extracting candidates. fixes #26 |
Date: |
Sat, 3 Dec 2022 10:59:27 -0500 (EST) |
branch: elpa/bash-completion
commit 6aedd690006e07199b2fcd319b9b840a527650e5
Author: Stephane Zermatten <szermatt@gmx.net>
Commit: Stephane Zermatten <szermatt@gmx.net>
Delete duplicates when extracting candidates. fixes #26
---
bash-completion.el | 2 +-
test/bash-completion-test.el | 10 +++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/bash-completion.el b/bash-completion.el
index 7de8bb226a..608341b17a 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -759,7 +759,7 @@ result. See `bash-completion-fix' for more details."
(push (bash-completion-fix
completion parsed-stub unparsed-stub open-quote completion-type
nil)
result))
- (nreverse result))))
+ (delete-dups (nreverse result)))))
(defun bash-completion-fix
(str parsed-prefix unparsed-prefix open-quote completion-type single)
diff --git a/test/bash-completion-test.el b/test/bash-completion-test.el
index 5532da53e0..5c112affa7 100644
--- a/test/bash-completion-test.el
+++ b/test/bash-completion-test.el
@@ -582,7 +582,15 @@ Return (const return-value new-buffer-content)"
"hello world\nhello \n\n"
(cl-letf (((symbol-function 'bash-completion-buffer)
(lambda () (current-buffer))))
- (bash-completion-extract-candidates "hello" "hello" nil nil)))))))
+ (bash-completion-extract-candidates "hello" "hello" nil nil)))))
+ (should
+ (equal
+ '("hello" "hellish" "hellow")
+ (bash-completion-test-with-buffer
+ "hello\nhellish\nhello\nhellow\n"
+ (cl-letf (((symbol-function 'bash-completion-buffer)
+ (lambda () (current-buffer))))
+ (bash-completion-extract-candidates "hell" "hell" nil nil)))))))
(ert-deftest bash-completion-nonsep-test ()
(should (equal "^ \t\n\r;&|'\"#"
- [nongnu] elpa/bash-completion 35d38fd3dc 295/313: Workaround for output containing \r\n instead of \n., (continued)
- [nongnu] elpa/bash-completion 35d38fd3dc 295/313: Workaround for output containing \r\n instead of \n., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 666244383e 296/313: Workaround for command-line being echoed., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion abb72c36b8 297/313: Merge branch 'master' of github.com:szermatt/emacs-bash-completion, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion e35943f37e 299/313: Fix backward-compatibility issue on 24.3: avoid using alist-get., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion abbe3bc268 301/313: Cleanup implementation of bash-completion-debug., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion ca4fbce016 305/313: Turn off bash completion when non-bash prompts are detected., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion abe93ae2f6 308/313: Fix whitespace (#47), ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion df635e79fd 310/313: Replace deprecated `cl` package with `cl-lib` (#50), ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 8e9c20dbfe 313/313: Replace or quote certain single quotes in docstrings (#55), ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion aa9bea48ba 022/313: fix position, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 6aedd69000 164/313: Delete duplicates when extracting candidates. fixes #26,
ELPA Syncer <=
- [nongnu] elpa/bash-completion 58447c67bf 206/313: Merge the send functions, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion d6c28d3132 302/313: Add a troubleshooting section to README.md, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion d550256e3f 306/313: Disable flakey test for now., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion a8f7de1e91 173/313: Merge remote-tracking branch 'montag451/remote-shell-support-rebase', ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 9521f79b33 176/313: Display the emacs command run by the tests., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion fc3f762d16 177/313: Track and support options -o default, filenames and nospace., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion c6df9be78d 182/313: Store the alist as process property., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion fefe5ae88e 191/313: Introduce bash-completion-remote-prog., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion d99ad71050 199/313: Add a new option to disable the use of separate processes to perform completion, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion ce59fb017a 202/313: Fallback to the use of a separate process if an error occurs, ELPA Syncer, 2022/12/03