* bug#9161: 24.0.50; incorrect completion-at-point in *shell* buffer
@ 2011-07-24 12:32 Kenichi Handa
2011-08-23 5:25 ` Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: Kenichi Handa @ 2011-07-24 12:32 UTC (permalink / raw)
To: 9161
With the latest trunk Emacs, the command completion-at-point
(TAB) in *shell* buffer yields wrong completion.
Provided that you have a single directory '0 a'.
% ls 0<TAB>
is completed to
% ls 0\ a
But,
% cd 0<TAB>
is completed to
% cd 0 a
Note that the space between '0' and 'a' is not escaped by '\'.
---
Kenichi Handa
handa@m17n.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#9161: 24.0.50; incorrect completion-at-point in *shell* buffer
2011-07-24 12:32 bug#9161: 24.0.50; incorrect completion-at-point in *shell* buffer Kenichi Handa
@ 2011-08-23 5:25 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2011-08-23 5:25 UTC (permalink / raw)
To: Kenichi Handa; +Cc: 9161-done
> But,
> % cd 0<TAB>
> is completed to
> % cd 0 a
Thanks. I think the patch below fixes this problem.
Stefan
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog 2011-08-23 05:21:09 +0000
+++ lisp/ChangeLog 2011-08-23 05:23:21 +0000
@@ -1,5 +1,8 @@
2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
+ * 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.
=== modified file 'lisp/pcomplete.el'
--- lisp/pcomplete.el 2011-08-23 05:21:09 +0000
+++ lisp/pcomplete.el 2011-08-23 05:21:58 +0000
@@ -883,7 +883,7 @@
(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
=== modified file 'lisp/shell.el'
--- lisp/shell.el 2011-08-23 05:21:09 +0000
+++ lisp/shell.el 2011-08-23 05:21:45 +0000
@@ -412,6 +412,8 @@
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-23 5:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-24 12:32 bug#9161: 24.0.50; incorrect completion-at-point in *shell* buffer Kenichi Handa
2011-08-23 5:25 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).