You are not logged in.

#1 2006-06-28 11:34:52

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Irritating terminal issue [SOLVED]

Hi,

I have an irritating problem with my terminals, when the line go beyond the terminal width, it doesn't go to the next line, but begin at the beginning of the same line, it is very irritating for long commands coz it all get mixed up.
Screenshot:
[URL=http://Serv1.imagehigh.com/view.php?id=10489_screenshot000.png&path=/imgs//ih000001]10489_screenshot000.th.png[/URL]

.Xdefaults
.inputrc

any ideas ??

Thx

Offline

#2 2006-06-28 12:35:08

smoon
Member
Registered: 2005-08-22
Posts: 468
Website

Re: Irritating terminal issue [SOLVED]

You need to tell your shell which characters are visible and which not (escape-sequences for colors for example). In Bash you can enclose these within [ ]. See E3 in the Bash FAQ.

For example, this would be correct:

PS1="[e[1;34;40m[e[0;36m]u@h:w[e[1;34;40m]e[0;37;40m] $[e[0;37;0m] "

whereas

PS1="e[1;34;40m[e[0;36mu@h:we[1;34;40m]e[0;37;40m $e[0;37;0m "

is wrong.

Offline

#3 2006-06-28 17:20:07

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Irritating terminal issue [SOLVED]

Try

shopt -s checkwinsize

then retry.  Typically the failed wrapping is caused by bash not knowing the size of the window.  checkwinsize causes bash to recheck it after every command.

Offline

#4 2006-06-28 18:28:17

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Re: Irritating terminal issue [SOLVED]

smoon wrote:

You need to tell your shell which characters are visible and which not (escape-sequences for colors for example). In Bash you can enclose these within [ ]. See E3 in the Bash FAQ.

For example, this would be correct:

PS1="[e[1;34;40m[e[0;36m]u@h:w[e[1;34;40m]e[0;37;40m] $[e[0;37;0m] "

whereas

PS1="e[1;34;40m[e[0;36mu@h:we[1;34;40m]e[0;37;40m $e[0;37;0m "

is wrong.

They were all enclosed except the last one (it seems I forget it) Thanks a lot for pointing this out smile

phrakture wrote:

Try

shopt -s checkwinsize

then retry.  Typically the failed wrapping is caused by bash not knowing the size of the window.  checkwinsize causes bash to recheck it after every command.

I already have it phrak but the problem was the one above, thanx anyway big_smile

Offline

Board footer

Powered by FluxBB