[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/bash-completion 5171866b65 180/313: Simplify options a bit
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/bash-completion 5171866b65 180/313: Simplify options a bit, since the only useful option is nospace. |
Date: |
Sat, 3 Dec 2022 10:59:28 -0500 (EST) |
branch: elpa/bash-completion
commit 5171866b65506e3b4fa3367b0e198d279b7beb6d
Author: Stephane Zermatten <szermatt@gmx.net>
Commit: Stephane Zermatten <szermatt@gmx.net>
Simplify options a bit, since the only useful option is nospace.
---
bash-completion.el | 45 +++++++++------------------------------------
1 file changed, 9 insertions(+), 36 deletions(-)
diff --git a/bash-completion.el b/bash-completion.el
index d1e2c122ce..36a82d93b3 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -250,13 +250,6 @@ completion in colon-separated values.")
(append bash-completion-wordbreaks-str nil)
"`bash-completion-wordbreaks-str' as a list of characters.")
-(defconst bash-completion--default-option-strings
- '("filenames")
- "Compgen for command, default and wordbreak completions.
-
-`bash-completion--parse-options' is applied to it at runtime, to
-allow customization of these options.")
-
(defconst bash-completion-special-chars "[^-0-9a-zA-Z_./\n=]"
"Regexp of characters that must be escaped or quoted.")
@@ -319,7 +312,7 @@ See options definition in
(if (eq (bash-completion--type comp) 'custom)
(bash-completion--extract-compgen-options
(bash-completion--compgen-args comp))
- bash-completion--default-option-strings)))
+ nil)))
;;; ---------- Inline functions
@@ -471,8 +464,7 @@ This function is not meant to be called outside of
pos
(bash-completion--default-completion
after-wordbreak unparsed-after-wordbreak
- open-quote (bash-completion--parse-options
- bash-completion--default-option-strings))))))
+ open-quote (bash-completion--parse-options nil))))))
(defun bash-completion--find-last (elt array)
"Return the position of the last intance of ELT in array or nil."
@@ -1344,32 +1336,13 @@ Return the status code of the command, as a number."
(defun bash-completion--parse-options (option-strings)
"Parse OPTIONS-STRINGS for compgen into a list of symbols.
-Supported options and compgen option equivalent:
- 'nospace: -o nospace"
- (let ((options))
- (if (bash-completion--check-option
- option-strings
- "nospace" bash-completion-nospace)
- (push 'nospace options))
- options))
-
-(defun bash-completion--check-option
- (option-strings option-name customize-option)
- "Return t if the option should be enabled.
-
-OPTION-STRINGS is a list of compgen option strings, often
-generated by `bash-completion--extract-compgen-options'
-
-OPTION-NAME is a string that correspond to the option to check,
-what follows -o.
-
-CUSTOMIZE-OPTION is a customized value, which is either
-'as-configured, to take the option from OPTION-STRINGS, t, to
-force it to be always enabled, or nil, to force it to be always
-disabled."
- (if (eq 'as-configured customize-option)
- (member option-name option-strings)
- customize-option))
+The only supported option is nospace, which might come from
+compgen options or from `bash-completion-nospace'"
+ (if (if (eq 'as-configured bash-completion-nospace)
+ (member "nospace" option-strings)
+ bash-completion-nospace)
+ '(nospace)
+ nil))
(provide 'bash-completion)
;;; bash-completion.el ends here
- [nongnu] elpa/bash-completion 5e05365dc8 153/313: Cleanup tests, split them into unit and integration tests., (continued)
- [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, 2022/12/03
- [nongnu] elpa/bash-completion 5171866b65 180/313: Simplify options a bit, since the only useful option is nospace.,
ELPA Syncer <=
- [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
- [nongnu] elpa/bash-completion 0c4557a5ed 193/313: Integration test for default completion (-D)., ELPA Syncer, 2022/12/03