Oh, sorry about that. Apparently, xterm uses a different value for PS1
than gnome-terminal by default. It seems that this issue only happens
when color escape sequences are involved, which is why it didn’t happen
for me in xterm. However, when I manually set xterm to the same value as
in gnome-terminal, I also got the issue in xterm.

So, it does seem like a bash issue once again. Thanks for checking!

** Also affects: bash (Ubuntu)
   Importance: Undecided
       Status: New

** Summary changed:

- Input prompt behaves incorrectly if working directory path spans two lines
+ Input prompt behaves incorrectly if working directory path spans three lines

** Description changed:

  1) The release of Ubuntu you are using: Ubuntu 17.10
  
- 2) The version of the package you are using: 3.24.2-0ubuntu4
+ 2) The version of the package you are using: gnome-terminal version
+ 3.24.2-0ubuntu4; bash version 4.4-5ubuntu1
  
  3) What you expected to happen: The input prompt should behave the same,
  no matter what the working directory is.
  
  4) What happened instead: The cursor starts overlapping the working
  directory text (see attached screenshot, which shows a 80×24 terminal
  window in a directory called
  
“/home/test/01234567890123456789/01234567890123456789/a/01234567890123456789/01234567890123456789/01234567890123456789/01234567890123456789”).
  
  On text input, the inputted text overwrites the working directory text.
  When pressing backspace, the entire second line is deleted (including
  the $ character). This makes using the history (up arrow) very confusing
  because afterwards, the actual input line characters do not seem to
  correspond to the displayed text anymore, i.e. characters inserted at a
  certain point are actually shifted in the resulting line, making it very
  difficult to properly type in commands.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1745271

Title:
  Input prompt behaves incorrectly if working directory path spans three
  lines

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1745271/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to