From ccb6090a078693e971578e3c419df9140badaa80 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Francesco=20Potort=C3=AC?= Date: Thu, 18 Apr 2002 19:41:57 +0000 Subject: [PATCH] (comint-watch-for-password-prompt): Remove whitespace at the beginning of password prompts. --- lisp/comint.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/comint.el b/lisp/comint.el index c47baba3651..aa5dfdfc846 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1984,6 +1984,8 @@ process if STRING contains a password prompt defined by This function could be in the list `comint-output-filter-functions'." (when (string-match comint-password-prompt-regexp string) + (when (string-match "^[ \n\r\t\v\f\b\a]+" string) + (setq string (replace-match "" t t string))) (let ((pw (comint-read-noecho string t))) (send-invisible pw)))) -- 2.39.2