Hey everyone.
I'm an advanced Linux user, but relatively new to FreeBSD.
Running:
* FreeBSD 5.4-STABLE
* Shell: /bin/bash
So by default, my shell prompt looked like:
This isn't very useful, so I wanted it to behave how I'm used to it ... showing something likeQuote:
bash-2.05b$
To do this, I'm using something similar to Ubuntu (and recommended by a few websites -- e.g. http://kinzlaw.wordpress.com/2007/08...mpt_command/):Quote:
username@hostname: current_dir$
So in my .bashrc:
Unfortunately though, (for reasons unknown to me), the FreeBSD doesn't know what those ANSI escape character codes mean ... so I removed it and made a simpler statement of:Code:export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"'.
This is REALLY CLOSE. The functionality is there. Here's what it looks like:Code:export PROMPT_COMMAND='echo -n "${USER}@`hostname -s`: ${PWD/#$HOME/~}"'
However, for some reason (again, unknown to me), the bash prompt is ALWAYS appended with the bash version number:Quote:
username@hostname_short: CWDbash-2.05b$
.Quote:
bash-2.05b
I've looked at .bash_profile, .profile, etc. I can't find anywhere where it might "append" something to the existing value of PROMPT_COMMAND...
Any tips on how to fix this?
