Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tmux prints long commands to beginning of same line without line break [duplicate]

When typing a long command in tmux instead of printing to the next line the end of the command shows up at the beginning of the same line.

So instead of user@computer:~$ aaaaaaaaaaa aaaaa this happens aaaaacomputer:~$ aaaaaaaaaaa

Using the standard terminal everything is fine.

like image 582
André Betz Avatar asked Nov 27 '22 01:11

André Betz


1 Answers

If you have unescaped characters in your PS1 variable it might not wrap lines correctly.

Try

export PS1="\u@\h-\\$\[$(tput sgr0)\]"

If that fixes your problem you need to update your .bashrc file.

like image 88
oriku Avatar answered Dec 05 '22 18:12

oriku