branch: elpa/bash-completion
commit bbff4fa52766f018fed8499a4b8ce8c3a96fe129
Merge: f523a290a6 912e1e8153
Author: Stephane Zermatten <[email protected]>
Commit: Stephane Zermatten <[email protected]>
Merge branch 'master' of github.com:szermatt/emacs-bash-completion
---
bash-completion.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/bash-completion.el b/bash-completion.el
index ea14410d2f..068f9701d7 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -196,6 +196,12 @@ to remove the extra space bash adds after a completion."
:type '(boolean)
:group 'bash-completion)
+(defcustom bash-completion-default-completion t
+ "Use Readline’s default filename completion if a compspec
+ generates no matches."
+ :type 'boolean
+ :group 'bash-completion)
+
(defvar bash-completion-start-files
'("~/.emacs_bash.sh" "~/.emacs.d/init_bash.sh")
"Shell files that, if they exist, will be sourced at the
@@ -713,7 +719,7 @@ The result is a list of candidates, which might be empty."
(when (eq 0 completion-status)
(bash-completion-extract-candidates
(nth cword words) unparsed-stub open-quote (car cmdline))))
- (if (and (not candidates) (eq 'custom (car cmdline)))
+ (if (and bash-completion-default-completion (not candidates) (eq 'custom
(car cmdline)))
(bash-completion--default-completion
(nth cword words) unparsed-stub open-quote 'default)
candidates)))