Date: Mon, 16 Nov 2009 03:17:58 +0100 From: Polytropon <freebsd@edvax.de> To: "Michael P. Soulier" <msoulier@digitaltorque.ca> Cc: freebsd-questions@freebsd.org Subject: Re: bash prompt update lagging Message-ID: <20091116031758.0729246c.freebsd@edvax.de> In-Reply-To: <20091115231424.GA29418@anton.digitaltorque.ca> References: <20091115231424.GA29418@anton.digitaltorque.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 15 Nov 2009 18:14:25 -0500, "Michael P. Soulier" <msoulier@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@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@r55:~$ cd /etc
poly@r55:/etc$ cd /usr/src/sys
poly@r55:/usr/src/sys$
And the \W short form:
poly@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@r55:sys$ cd /bin
poly@r55:bin$ cd /usr/local
poly@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, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091116031758.0729246c.freebsd>
