Xfce Forum

Sub domains
 

You are not logged in.

#1 2014-11-13 08:28:51

Nilak
Member
Registered: 2011-10-19
Posts: 11

[Solved] Line wrap issue xfce terminal 0.6.3

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

#2 2014-11-13 11:48:33

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,494

Re: [Solved] Line wrap issue xfce terminal 0.6.3

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

#3 2014-11-14 09:42:51

Nilak
Member
Registered: 2011-10-19
Posts: 11

Re: [Solved] Line wrap issue xfce terminal 0.6.3

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


my terminal

Offline

#4 2014-11-14 11:23:13

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,494

Re: [Solved] Line wrap issue xfce terminal 0.6.3

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

#5 2014-11-17 08:34:50

Nilak
Member
Registered: 2011-10-19
Posts: 11

Re: [Solved] Line wrap issue xfce terminal 0.6.3

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 smile

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.021 seconds, 7 queries executed - Memory usage: 534.17 KiB (Peak: 535.02 KiB) ]