On 07/09/23 16:24, Gioele Barabucci wrote:
On 07/09/23 16:15, Greg Wooledge wrote:
On Thu, Sep 07, 2023 at 04:03:39PM +0200, Gioele Barabucci wrote:
The following snippet shows that, even with the final \], Bash produces the same erroneous output and miscalculates the cursor position (it just needs a
longer prompt):

     $ long_name="$(printf 'abcdef0123456789/%.0s' {0..20})"
     $ mkdir -p /tmp/$long_name
     $ cd /tmp/$long_name
     $ PS1=$'\n\[\e[1m\]\w\[\e[m\] \$ '

     Now press the up arrow, then the down arrow)

Have you tried testing with several different terminal emulators?

Yes. I tried with xterm, gnome-terminal and the native Linux VT. They all show the same problem.

In the heat of the testing I mistakenly used bash 5.0, not bash 5.2.

Bash 5.2.12 does not show this problem.

Regards,

--
Gioele Barabucci

Reply via email to