branch: elpa/bash-completion
commit 3036ef039474335dc5ed98fa8d202edf76bc250c
Author: Stephane Zermatten <[email protected]>
Commit: Stephane Zermatten <[email protected]>
disable quote_readline to get good whitespace handling for bash 3.2 at least
---
bash-completion.el | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/bash-completion.el b/bash-completion.el
index 910d11205e..c174ac925b 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -227,6 +227,11 @@ The result is a list of candidates, which might be empty."
(process-send-string process (concat ". " startfile2 "\n")))))
(bash-completion-send "PS1='\v'" process
bash-completion-initial-timeout)
(bash-completion-send "function __bash_complete_wrapper { eval
$__BASH_COMPLETE_WRAPPER; }" process)
+ ;; some bash completion functions use quote_readline to double-quote
+ ;; strings - which compgen understands but only in some environment.
+ ;; disable this dreadful business to get a saner way of handling
+ ;; spaces.
+ (bash-completion-send "function quote_readline { echo \"$1\"; }")
(bash-completion-send "complete -p" process)
(bash-completion-build-alist (process-buffer process))
(setq bash-completion-process process)