You are not logged in.
Pages: 1
Hello,
I'm facing an issue with xfce terminal, if I type a too long command line, the line wrap doesn't work... It overwrittes my prompt then the command line...
I did some search on google, I found I had to add "checkwinsize" option but it's already enable
echo $BASHOPTS
checkwinsize:cmdhist:expand_aliases:extglob:extquote:force_fignore:histappend:interactive_comments:progcomp:promptvars:sourcepath
I found too it was possible I was facing this issue because I got a complex PS1...
echo $PS1
[\e[1;32m\u\e[m@\e[1;34m\h\e[m \e[1;33m\W\e[m]
Do you have any idea, how can I fix it?
Offline
Try:
PS1='\[\e[0;32m\]\u@\[\e[m\]\[\e[1;34m\]\h\[\e[m\] \[\e[1;32m\]\w\[\e[m\] \[\e[1;37m\]'
The Arch Color Bash Prompt wiki entry has some good information about creating color bash prompts.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
I don't have a problem about color... The problem is terminal is overwriting my prompt despite the line is not over...
As you can see below my promt is romain@cia-47 but azeazeazeaze is overwriting it
Offline
When I use your PS1 from your first post, it overwrites my prompt like yours does. When I use the modified one from my reply it doesn't. As I understand it, its not about the colour codes but proper use of \[ \] tags. From the wiki article:
\[ and \] - These tags should be placed around color codes so bash knows how to properly place the cursor.
Did you try the PS1 prompt from my reply?
Does the PS1 prompt function differently on other terminal apps such as xterm (to rule out an issue with xfce4-terminal)?
Does the default PS1 prompt that ships with your distro work properly?
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Hello,
You were right, it was about bracket open and close. I added \[ and \] around color codes and it fixed my issue. Sorry that I didn't understand what you meant first.
Thank you
Offline
Pages: 1
[ Generated in 0.021 seconds, 7 queries executed - Memory usage: 534.17 KiB (Peak: 535.02 KiB) ]