bash prompt update lagging
Polytropon
freebsd at edvax.de
Mon Nov 16 02:18:01 UTC 2009
On Sun, 15 Nov 2009 18:14:25 -0500, "Michael P. Soulier" <msoulier at digitaltorque.ca> wrote:
> \[\033[1;32m\]\[\033[0;36m\]\u\[\033[1;32m\]@\[\033[0;36m\]\h\[\033[1;32m\]:\[\033[0;37m\]${SHORT_PWD}\[\033[1;32m\]$\[\033[0;37m\]
> I'm wondering if this is a bash bug on bsd, or if I'm doing something wrong.
Your PS1 seems to include ${SHORT_PWD}, a variable. It seems
that it is not updated immediately after the cd command.
> Has anyone seen this?
No. I don't have any path information at all when I use your PS1.
poly at r55:$
By the way, this is bash-3.2.25 on FreeBSD/x86 7.
But I tried to replace the ${SHORT_PWD} by the \w control
sequence (as mentioned in "man bash"). This is the result:
$ export PS1="\[\033[1;32m\]\[\033[0;36m\]\u\[\033[1;32m\]@\[\033[0;36m\]\h\[\033[1;32m\]:\[\033[0;37m\]\w\[\033[1;32m\]$\[\033[0;37m\] "
poly at r55:~$ cd /etc
poly at r55:/etc$ cd /usr/src/sys
poly at r55:/usr/src/sys$
And the \W short form:
poly at r55:/usr/src/sys$ export PS1="\[\033[1;32m\]\[\033[0;36m\]\u\[\033[1;32m\]@\[\033[0;36m\]\h\[\033[1;32m\]:\[\033[0;37m\]\w\[\033[1;32m\]$\[\033[0;37m\] "
poly at r55:sys$ cd /bin
poly at r55:bin$ cd /usr/local
poly at r55:local$
The username and hostname are cyan, @, : and $ are bright green.
Is this what you've intended the prompt to look like?
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions
mailing list