bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20873: 24.5; shell command completion faulty


From: Leo Liu
Subject: bug#20873: 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 ()





reply via email to

[Prev in Thread] Current Thread [Next in Thread]