[EShell] Fix completion for git
Search string was not up-to-date anymore, and comments behind actual commands have changed.
This commit is contained in:
parent
8950a3e8ab
commit
2be4970d2a
|
@ -57,14 +57,11 @@
|
||||||
(if (not (zerop (call-process "git" nil (current-buffer) nil "help" "--all")))
|
(if (not (zerop (call-process "git" nil (current-buffer) nil "help" "--all")))
|
||||||
(warn "Cannot call `git’ to obtain list of available commands; completion won’t be available.")
|
(warn "Cannot call `git’ to obtain list of available commands; completion won’t be available.")
|
||||||
(goto-char 0)
|
(goto-char 0)
|
||||||
(search-forward "available git commands in")
|
|
||||||
(let (commands)
|
(let (commands)
|
||||||
(while (re-search-forward
|
(while (re-search-forward
|
||||||
"^[[:blank:]]+\\([[:word:]-.]+\\)[[:blank:]]*\\([[:word:]-.]+\\)?"
|
"^[[:blank:]]\\{3\\}\\([[:word:]-.]+\\)[[:blank:]]+"
|
||||||
nil t)
|
nil t)
|
||||||
(push (match-string 1) commands)
|
(push (match-string 1) commands))
|
||||||
(when (match-string 2)
|
|
||||||
(push (match-string 2) commands)))
|
|
||||||
(sort commands #'string<)))))
|
(sort commands #'string<)))))
|
||||||
|
|
||||||
(defconst pcmpl-git-commands (pcmpl-git-commands)
|
(defconst pcmpl-git-commands (pcmpl-git-commands)
|
||||||
|
|
Loading…
Reference in New Issue