From ac4ae7cd064e82a554a00738042645a91c334579 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Wed, 23 Dec 2009 10:38:21 +0000 Subject: [PATCH] dot/emacs, el/dot-emacs.el: Fix patterns for root prompt. Organization: Straylight/Edgeware From: Mark Wooding If it's a root prompt on a deficient terminal, it'll have two `>' at the end. Of course, if it's on a stale terminal for a non-root session, it'll only have one, so be careful. --- dot/emacs | 2 +- el/dot-emacs.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dot/emacs b/dot/emacs index 2a7796a..c291fdd 100644 --- a/dot/emacs +++ b/dot/emacs @@ -724,7 +724,7 @@ ;; Make the shell mode aware of my prompt. -(setq shell-prompt-pattern "^[^]#$%>»}\n]*[]#$%>»}] *") +(setq shell-prompt-pattern "^[^]#$%>»}\n]*\\([]#$%»}]\\|>>?\\) *") (setq comint-password-prompt-regexp (concat "\\(\\([Ee]nter \\|[Oo]ld \\|[Nn]ew \\|[a-zA-Z0-9_]*'s \\|^\\)" "[Pp]assword\\|pass phrase\\):")) diff --git a/el/dot-emacs.el b/el/dot-emacs.el index 4969f29..e6b00c0 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -2081,7 +2081,7 @@ (defun mdw-eshell-prompt () (eshell/pwd) right))) (setq eshell-prompt-function 'mdw-eshell-prompt) -(setq eshell-prompt-regexp "^\\[[^]]+\\]") +(setq eshell-prompt-regexp "^\\[[^]>]+\\(\\]\\|>>?\\)") (defalias 'eshell/e 'find-file) (defalias 'eshell/w3m 'w3m-goto-url) -- [mdw]