Bash prompt
Aaron Peterson
dopplecoder at gmail.com
Mon Jul 18 13:25:54 GMT 2005
On 7/17/05, Alex Yarmol <alex.yarmol at gmail.com> wrote:
> How I can chage my bash prompt to this:
>
> [user at host directory-name(e. g. "alex" for /usr/home/alex)]$
>
> I assume that I need to do that:
>
> export PS1='[\u@\h \(here i don't know what to do, i assume, that I
> need to write "\p" or "\P", but it's not working)]\$
\w lowercase should give you the full path
\W uppercase gives the last component of the path, so given:
[user at host /]$ cd /usr/local/etc
[user at host etc]$
which tend to prefer to the full path, but you didn't ask what I prefer :-)
Aaron
More information about the freebsd-questions
mailing list