I have an issue with my Ubuntu default terminal overwriting the current line when the prompt (specifically, the path that I am cd
ing into) is quite large. I have closely followed the issue here: Terminal prompt not wrapping correctly and my problem is very similar, but unfortunately not the same.
Specifically, I have narrowed down the cause by commenting and uncommenting the .bashrc
file and I have found the following lines to cause the problem:
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
Is there a specific way that I can fix it without commenting it wholly, since Ubuntu might know for which reason this is right there?
hostname
] "'$LOGNAME:$PWD> ' There's a chance the special characters and variable expansions are messing things up. Try a simple PS1 and if it works, add back in your customizations one at a time and see which one is causing the problem. – mikem Dec 22 '20 at 19:07ssh
installed for this PC, so I am currently unable to test that one) – Dec 23 '20 at 00:03