bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#46609: Fix shell password prompt in minibuffer (bug 43302)


From: Lars Ingebrigtsen
Subject: bug#46609: Fix shell password prompt in minibuffer (bug 43302)
Date: Thu, 18 Feb 2021 16:29:40 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> > +    (when (string-match "[\n]+$" string)
>> > +      (setq string (replace-match "" t t string)))
>> 
>> This should probably be "\n+\\'", because we only want to remove
>> newlines from the end of the string, and not newlines from the middle of
>> the string, presumably?  ("$" means "match end of line", not "match end
>> of string".)
>
> Do we want to remove more than one newline?

It's just used as the prompt for a `read-string' call, so I think so?
Having a prompt end with a newline is just confusing.

(This (and the preceding two lines) should just be rewritten to use
`string-trim'.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]