You are not logged in.

#1 2010-11-10 00:31:11

cephalopoid
Member
Registered: 2009-08-05
Posts: 21

[SOLVED] PS1 faulty, linewrap trouble

I've spent some time trying to figure it out now, to no avail.
I've made a fancy PS1, but whenever I type a full line a character at the end of the line seems to disappear, leading to very confusing situations. I've read something about putting a \ before the []'s, but the only non-escaped characters are those that should appear in the PS1 and the ones that are supposed to be there according to the wiki. Please help me find a solution.

PS1='\[\033[1;30m\][\[\033[1;34m\]\u\[\033[1;30m\]@\[\033[1;34m\]\h\[\033[1;30m\] \[\033[1;31m\]\W\[\033[1;30m]\]\[\033[1;30m\]\$\[\033[0m\] '

This is what the result looks like(excluding colors):
[cephalopoid@paste ~]$

EDIT: A kind fellow on IRC helped me out when I pasted the link to this post. Seems I misplaced the \] and the ] after the \W.
Case solved, no more linewrap problems. Thanks for reading.

Last edited by cephalopoid (2010-11-10 09:43:04)

Offline

#2 2010-11-10 03:04:10

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: [SOLVED] PS1 faulty, linewrap trouble

Please edit the subject and prepend [SOLVED].


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

Board footer

Powered by FluxBB