I am having similar problems to this thread here, with the command line overwriting the line and my up arrow overwriting all of the text.
Terminal prompt not wrapping correctly
When I run
$ shopt | grep checkwinsize
checkwinsize on
It seems like the issue is caused by not wrapping the right parts of the ps1 part of my bashrc. script in []. i have tried to follow the explanations in the other threads, but it hasn't seemed to help.
This is the part of my bashrc. script.
force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# 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 anything wrong with my bashrc. script which is causing this problem?
I am running Ubuntu 16.04.4 Cinnamon version 3.6.7 and 4.13.0-36-generic kernel.
Thanks.