You are not logged in.

#1 2007-03-17 07:43:11

shevegen
Member
Registered: 2005-03-17
Posts: 10

PS1 String behaving differently - how to get only "/"?

Hi there, let me first start with the 4 lines of code I use for my PS1 string (in bash)

boBlack="\[\033[1;30m\]"
boGreen="\[\033[1;32m\]"
boCyanOnBlack="\[\033[1;36;40m\]"
export PS1="$boCyanOnBlack"'${PWD%*/}'"$boBlack/$boGreen"

Now what does this do?
It will make a coloured string as part of my current working dir. (Prompt)

Example:
If i go to

cd /home/shevegen

then my prompt will look like:
/home/shevegen/

(I like the trailing / because I can copy/paste easier with it. )

Now, the problem is when i am doing this:

cd /

then I am in /
and while in konsole it works, in VTE this does not work.

Does anyone know why this string behaves differently in
VTE and Konsole? VTE for example does not show any
/ when you are in
the / root dir

PS: Anyone has a hint or knows why in VTE and in gnome-terminal this does
not work?

Last edited by shevegen (2007-03-19 12:10:39)

Offline

Board footer

Powered by FluxBB