* bug#20873: 24.5; shell command completion faulty
@ 2015-06-22 13:24 Leo Liu
2015-06-22 22:13 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Leo Liu @ 2015-06-22 13:24 UTC (permalink / raw)
To: 20873
1. M-x shell
2. Put a few spaces before entering `c' followed by TAB
No completion.
I wonder if the following is the right fix?
diff --git a/lisp/shell.el b/lisp/shell.el
index 6d69ca63..788b8169 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -1134,7 +1134,9 @@ (defun shell-command-completion ()
(if (and filename
(save-match-data (not (string-match "[~/]" filename)))
(eq (match-beginning 0)
- (save-excursion (shell-backward-command 1) (point))))
+ (save-excursion (shell-backward-command 1)
+ (skip-syntax-forward " ")
+ (point))))
(shell--command-completion-data))))
(defun shell--command-completion-data ()
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-06-23 1:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-22 13:24 bug#20873: 24.5; shell command completion faulty Leo Liu
2015-06-22 22:13 ` Stefan Monnier
2015-06-23 1:26 ` Leo Liu
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.