Van Ly via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > Hello, Hi, > When using ssh to connect to a machine, the password prompt is expected > to be identical in the shell buffer and mini buffer. > > The mini buffer's prompt seems to make use of only the last character. > > See > > http://sdf.org/~van.ly/img/emacs-30-0-91-password-prompt.webp > > The shell buffer's password prompt shows > > van@192.168.1.144's password: > > The mini buffer shows > > 4's password: Thanks for the report. I can reproduce the problem. In fact, there are two issues: - comint-password-prompt-regexp uses "'s" in order to search for a password prompt. That's fine for password prompts like "van@192.168.1.144's password:", however, everything before this "'s" is ignored when the minibuffer prompt is assembled. - The string the password prompt is looked for is "van@192.168.1.144's password:". In comint-watch-for-password-prompt, the "" is removed, but while searching for the password prompt. As a result, (match-string 0 string) returns a wrong substring (just one position left). The problem does not happen with Emacs 29. The culprit seems to be commit 1a55e957ae57, which has changed the implementation of comint-watch-for-password-prompt. The appended patch fixes this for me in Emacs 30. Could you, please, check? Jim, do you have a comment? Best regards, Michael.