From 2be4970d2a62002bfd3a1a0796e0aac557a3b126 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sun, 9 Dec 2018 14:55:52 +0100 Subject: [PATCH] [EShell] Fix completion for git Search string was not up-to-date anymore, and comments behind actual commands have changed. --- site-lisp/db-eshell.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/site-lisp/db-eshell.el b/site-lisp/db-eshell.el index 9c6f290..9ba8317 100644 --- a/site-lisp/db-eshell.el +++ b/site-lisp/db-eshell.el @@ -57,14 +57,11 @@ (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.") (goto-char 0) - (search-forward "available git commands in") (let (commands) (while (re-search-forward - "^[[:blank:]]+\\([[:word:]-.]+\\)[[:blank:]]*\\([[:word:]-.]+\\)?" + "^[[:blank:]]\\{3\\}\\([[:word:]-.]+\\)[[:blank:]]+" nil t) - (push (match-string 1) commands) - (when (match-string 2) - (push (match-string 2) commands))) + (push (match-string 1) commands)) (sort commands #'string<))))) (defconst pcmpl-git-commands (pcmpl-git-commands)