--- Begin Message ---
Subject: |
24.5; shell command completion faulty |
Date: |
Mon, 22 Jun 2015 21:24:50 +0800 |
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 ()
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#20873: 24.5; shell command completion faulty |
Date: |
Tue, 23 Jun 2015 09:26:35 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (OS X 10.10.3) |
version: 25.1
On 2015-06-23 06:13 +0800, Stefan Monnier wrote:
> Could be. I don't have time to dig into it right now, but another
> option might be to change shell-backward-command instead.
OK. I put in a fix there. Thanks.
Leo
--- End Message ---