GNU bug report logs -
#20873
24.5; shell command completion faulty
Previous Next
Reported by: Leo Liu <sdl.web <at> gmail.com>
Date: Mon, 22 Jun 2015 13:26:02 UTC
Severity: normal
Found in version 24.5
Fixed in version 25.1
Done: Leo Liu <sdl.web <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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 ()
This bug report was last modified 9 years and 338 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.