[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/bash-completion f01d8726de 179/313: Remove support filenam
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/bash-completion f01d8726de 179/313: Remove support filenames options. |
Date: |
Sat, 3 Dec 2022 10:59:28 -0500 (EST) |
branch: elpa/bash-completion
commit f01d8726de43052f8a2c888194caf108172ad31b
Author: Stephane Zermatten <szermatt@gmx.net>
Commit: Stephane Zermatten <szermatt@gmx.net>
Remove support filenames options.
Go back to always applying filename post-processing. This seems to be
what bash does.
Issue #19
---
bash-completion.el | 19 ++++---------------
test/bash-completion-test.el | 12 ++----------
2 files changed, 6 insertions(+), 25 deletions(-)
diff --git a/bash-completion.el b/bash-completion.el
index 6c6135d71a..d1e2c122ce 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -851,8 +851,6 @@ character (' or \") or nil.
OPTIONS configrues some behaviors:
'nospace to not add a space after a single completion
- 'filenames to post-process candidates as filenames and detect
- directories
If SINGLE is non-nil, this is the single completion candidate.
@@ -911,11 +909,9 @@ for directory name detection to work."
((or (memq last-char bash-completion-wordbreaks)
(eq ?/ last-char))
(setq suffix ""))
- ((and
- (memq 'filenames options)
- (file-accessible-directory-p
- (bash-completion--expand-file-name (bash-completion-unescape
- open-quote (concat parsed-prefix
rest)))))
+ ((file-accessible-directory-p
+ (bash-completion--expand-file-name (bash-completion-unescape
+ open-quote (concat parsed-prefix
rest))))
(setq suffix "/"))
(single
(setq suffix (concat close-quote-str final-space-str)))
@@ -1349,19 +1345,12 @@ Return the status code of the command, as a number."
"Parse OPTIONS-STRINGS for compgen into a list of symbols.
Supported options and compgen option equivalent:
- 'default: -o default
- 'nospace: -o nospace
- 'filenames: -o filenames"
+ 'nospace: -o nospace"
(let ((options))
- (if (member "default" option-strings)
- (push 'default options))
(if (bash-completion--check-option
option-strings
"nospace" bash-completion-nospace)
(push 'nospace options))
- (if (or (member "filenames" option-strings)
- (memq 'default options))
- (push 'filenames options))
options))
(defun bash-completion--check-option
diff --git a/test/bash-completion-test.el b/test/bash-completion-test.el
index 72295a0192..1ddde4d471 100644
--- a/test/bash-completion-test.el
+++ b/test/bash-completion-test.el
@@ -572,13 +572,10 @@ Return (const return-value new-buffer-content)"
(should (equal "hello\\ world"
(bash-completion-fix " world" "hello" "hello" nil nil nil)))
- ;; append / for home, with option filenames
+ ;; append / for home
(should (equal "~/"
(bash-completion-fix (expand-file-name "~")
"~" "~" nil '(filenames) nil)))
- (should (equal "~"
- (bash-completion-fix (expand-file-name "~")
- "~" "~" nil nil nil)))
(cl-letf (((symbol-function 'file-accessible-directory-p)
(lambda (d) (equal d "/tmp/somedir"))))
@@ -1005,14 +1002,9 @@ before calling
`bash-completion-dynamic-complete-nocomint'.
(ert-deftest bash-completion--parse-options ()
(let ((bash-completion-nospace 'as-configured))
(should (equal nil (bash-completion--parse-options nil)))
- (should (equal '(filenames nospace default)
+ (should (equal '(nospace)
(bash-completion--parse-options
'("filenames" "nospace" "default"))))
- (should (equal '(filenames)
- (bash-completion--parse-options
- '("filenames"))))
- (should (equal '(filenames default)
- (bash-completion--parse-options '("default"))))
(setq bash-completion-nospace nil)
(should (equal '() (bash-completion--parse-options
'("nospace"))))
- [nongnu] elpa/bash-completion a789093cd3 155/313: Run tests on older versions of Emacs., (continued)
- [nongnu] elpa/bash-completion a789093cd3 155/313: Run tests on older versions of Emacs., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 5e05365dc8 153/313: Cleanup tests, split them into unit and integration tests., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 09c93ffbdb 165/313: Explicitly disable support for Emacs version older than 24.1., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 62c6567af6 158/313: Complete argument rename, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 5eb85cf1fc 166/313: Remove obsolete functions bash-completion-dynamic-complete-0 and, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 9b94818f88 167/313: Remove support for pre-Emacs24.1 backward compatibility., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 912e1e8153 170/313: Add an option to disable default Readline completion when no matches are found (#29), ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 959e27dae3 171/313: Add remote shell support, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 68f7d937b7 175/313: Make wordbreak completion work with bash-completion-enable-caching., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 2cf76221c2 178/313: Rely on compgen for default completion, instead of doing it with, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion f01d8726de 179/313: Remove support filenames options.,
ELPA Syncer <=
- [nongnu] elpa/bash-completion 5171866b65 180/313: Simplify options a bit, since the only useful option is nospace., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion a223260f2d 181/313: Get rid of bash-completion-alist completely., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 4f13e00702 183/313: Execute wordbreak completion "properly", as part of the normal, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 34221c1fdd 185/313: Make bash-completion-enable-caching the default, remove the, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 8c3995aa98 187/313: run_tests.sh displays the bash command to test against., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 3eba6922e6 190/313: Use executable-find instead of hardcoding /bin/bash., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 1d41c58bd5 192/313: Send initialization command as one string, as long as possible., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion c5d4f92e6d 195/313: Still EMACS_BASH_COMPLETE using setenv for local processes., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 24088ede85 196/313: Explicitly mention compatibility with Bash 3 and 4., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 0f6466eeb4 197/313: Tell minibuffer not to delay after displaying a message while, ELPA Syncer, 2022/12/03