You are not logged in.

#1 2008-12-13 21:01:23

initbox
Member
Registered: 2008-09-27
Posts: 172

[Solved]Bash prompt failure

export PS1="\e[1;32m\u\e[m \e[1;32m[\e[m\w\e[1;32m]\e[m: "

Right, that's my PS1. If my input is longer than one row, the text will start to overwrite the original prompt including the first row of text, which is ugly.

What gives?

(Having a "Small questions"-forum would be cool. tongue)

Last edited by initbox (2008-12-14 13:08:18)

Offline

#2 2008-12-13 22:39:52

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

Re: [Solved]Bash prompt failure

This is a terminal sizing issue... you may want to try adding "shopt -s checkwinsize" to your ~/.bashrc, which tells bash to check its own window size after every command

Offline

#3 2008-12-13 23:50:56

initbox
Member
Registered: 2008-09-27
Posts: 172

Re: [Solved]Bash prompt failure

phrakture wrote:

This is a terminal sizing issue... you may want to try adding "shopt -s checkwinsize" to your ~/.bashrc, which tells bash to check its own window size after every command

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

sad Have that already...

Offline

#4 2008-12-14 10:39:27

string
Member
Registered: 2008-11-03
Posts: 286

Re: [Solved]Bash prompt failure

Try this:

export PS1='\[\e[1;32m\]\u [\[\e[0m\]\W\[\e[1;32m\]]\[\e[0m\]: '

Offline

#5 2008-12-14 10:42:29

initbox
Member
Registered: 2008-09-27
Posts: 172

Re: [Solved]Bash prompt failure

string wrote:

Try this:

export PS1='\[\e[1;32m\]\u [\[\e[0m\]\W\[\e[1;32m\]]\[\e[0m\]: '

Yay, VICTORY! Thanks!

Offline

#6 2009-04-03 12:57:20

orphius
Member
Registered: 2009-01-24
Posts: 9

Re: [Solved]Bash prompt failure

nice

Last edited by orphius (2009-04-03 13:24:27)

Offline

Board footer

Powered by FluxBB