Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
long prompts in termina don't wrap correctly
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Un.tot
n00b
n00b


Joined: 16 Mar 2006
Posts: 55
Location: Hannover, Germany

PostPosted: Thu Aug 13, 2015 8:27 pm    Post subject: long prompts in termina don't wrap correctly Reply with quote

Hi folks,

today I encountered the following problem on my system: if the prompt in a terminal emulator is longer than the number of columns, it is not wrapped but shifted. Then the following prompts are messed up, because they are displayed as shifted and with parts of the last command displayed over the acr#tual prompt.

Currently I am using i3. I tested the above problem with xfce4-terminal 0.6.3 and rxvt-unicode 9.21 and both terminal emulators had the same problem. I googled a bit and found, that it could be a problem with bash, if checkwinsize is not set, but it is. The terminal emulators also have the correct number of columns in $COLUMN.

Any ideas?

Thanks.
_________________
Currently running gentoo on
Toshiba Tecra R840-109 and one Desktop-PC
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Thu Aug 13, 2015 8:37 pm    Post subject: Reply with quote

well afaik i3 does not ship with a terminal emulater. I use for example lilyterm

and most terminals use vte as libary or backbone .. whatever you want to call that feature...


Code:
[U] x11-libs/vte
     Available versions: 
     (0)    0.28.2-r206 0.28.2-r207
     (2.90) 0.36.3 0.36.4
     (2.91) 0.38.3 (~)0.40.2
       {+crypt debug glade +introspection python vala PYTHON_TARGETS="python2_7"}
     Installed versions:  0.28.2-r207(17:48:56 08.07.2015)(introspection python -debug PYTHON_TARGETS="python2_7")
     Homepage:            https://wiki.gnome.org/action/show/Apps/Terminal/VTE
     Description:         Library providing a virtual terminal emulator widget



so you need to check which terminal you use and if its depend son vte

well when its bash fault, you could try ksh, or some other shell, which exits ...

usually typing ksh changes teh active shell.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Thu Aug 13, 2015 10:23 pm    Post subject: Re: long prompts in termina don't wrap correctly Reply with quote

Un.tot wrote:
today I encountered the following problem on my system: if the prompt in a terminal emulator is longer than the number of columns, it is not wrapped but shifted. Then the following prompts are messed up, because they are displayed as shifted and with parts of the last command displayed over the acr#tual prompt.

Un.tot ... not a bash user however the gentoo default bash PS1 has \w (with \W for root shell) ... as I remember \w will not trunctate the current working directory (which will be the only part of PS1 to increase in length), whereas \W does. So, you may find replacing \w with \W in PS1 fixes the issue.

Code:
$ PS1+='\[\033[01;32m\]\u@\h\[\033[01;34m\] \W \$\[\033[00m\] '
$ cd /very/very/very/deep/into/the/directory/structure/

HTH & best ... khay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum