From 1802e44433f0a36f3a3f877654cb2c2a666893e7 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 23 Aug 2011 01:25:17 -0400 Subject: * lisp/shell.el (shell-completion-vars): Set pcomplete-arg-quote-list. * lisp/pcomplete.el (pcomplete-quote-argument): Fix thinko. Fixes: debbugs:9161 --- lisp/ChangeLog | 3 +++ lisp/pcomplete.el | 2 +- lisp/shell.el | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e0322ae4595..61ef1a21065 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-08-23 Stefan Monnier + * shell.el (shell-completion-vars): Set pcomplete-arg-quote-list. + * pcomplete.el (pcomplete-quote-argument): Fix thinko (bug#9161). + * pcomplete.el (pcomplete-parse-comint-arguments): Fix inf-loop. Mark obsolete. * shell.el (shell-parse-pcomplete-arguments): New function. diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el index 02f3c4ad1da..bdf2dadd16c 100644 --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el @@ -883,7 +883,7 @@ Magic characters are those in `pcomplete-arg-quote-list'." (or (run-hook-with-args-until-success 'pcomplete-quote-arg-hook filename index) (when (memq c pcomplete-arg-quote-list) - (string "\\" c)) + (string ?\\ c)) (char-to-string c)) (setq index (1+ index)))) filename diff --git a/lisp/shell.el b/lisp/shell.el index 53472d9ef0a..01d1a688f0e 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -412,6 +412,8 @@ to `dirtrack-mode'." shell-dynamic-complete-functions) (set (make-local-variable 'pcomplete-parse-arguments-function) #'shell-parse-pcomplete-arguments) + (set (make-local-variable 'pcomplete-arg-quote-list) + (append "\\ \t\n\r\"'`$|&;(){}[]<>#" nil)) (set (make-local-variable 'pcomplete-termination-string) (cond ((not comint-completion-addsuffix) "") ((stringp comint-completion-addsuffix) -- cgit v1.2.1