Trouble with the terminal wrapping lines
I'm having trouble with gnome terminal wrapping long lines when it doesn't need to. I've googled this problem, but haven't come up with any solutions. I'm hoping you guys can help me out. Here's a video of the bug in action:
My PS1
PS1='[\u@\h \W] $(__git_ps1 "(%s)")\$ '
Update, I've tried it without the __git_ps1 in there too.
Much appreciated.
About this post
- Posted
- Archived
- Score
- 9 · 100% up
- Kind
- Text
- ID
- mp3md
7 comments
forum link
It's a problem with bash making you wrap non printing characters with "\ [" and "\ ]" (without the spaces - reddit seems to not like those characters).
My PS1: '[\e[0;32m]\u($('gmailcount')) [\e[m\e[0;31m][\A][\e[m] [\e[1;34m]\w[\e[m] [\e[1;32m$\e[m] '
I can't remember much about it, aside from the fact that it did what I wanted it to. I built a gaming desktop, and went back to Windows for Steam.
That is probably the norm. :-)
Two common issues with terminal wrapping:
can you please elaborate on what you did to solve this? i have run into this same bug and it drives me insane.
Someone said it was caused by the PS1 so I looked at that first, but saw nothing wrong with it. Then I went through my ~/.bashrc file to see what custom stuff I had added and commented out things one by one. After each iteration I ran
resetin my terminal, closed it and then reopened it.The cause of my problem was down to the completion script added by npm (node package manager).I experienced the problem again, not sure what it is now :-(
As opposed to resetting, you can just type "source ~/.bashrc" if you want to load that file into your terminal. Just a thought for next time. :)