hi, folks! i've got a little problem.. i'm setting my sh prompt, but
doesn't seems to work... how can i fix it?
thx in advance!
Code:
PS1="[\u@\h:\W, \@, \d]> "
thx in advance!
PS1="[\u@\h:\W, \@, \d]> "
killerklown said:thx, i didn't know it.. I changed my shell to bash just for my user with chsh![]()
killerklown said:thx, i didn't know it.. I changed my shell to bash just for my user with chsh![]()
set prompt = "%n@%m:%~%#"
set prompt="(%l)[%{\033[36m%}`whoami`@%{\033[1;30m%}%m:%{\033[0;32m%}%~%{\033[0m%}]%# "
/me subscribe to this opinion .Don't change root's shell to bash though.
No. In fact it's a perverse combination of Thompson, Bourne, and Almquist' shell. Only admitting to Almquist's ;-)You're trying to use something that's for bash. See sh(1).
Keep in mind that on FreeBSD /bin/sh is NOT bash (as it is on Linux).
r300642
. I simply created a variable involving a date(1), and strftime(3) to produce the output I was interested in. But I was never able to utilize the C escape functions to returm a newline \n. So I had to kludge that. :-(.PS1='$USER:$PWD % '
PS1="$(pwd) $(hostname) $(id -un) "
newline="
"
# time is NOT dynamic
#cdate="$(date +%H:%S%p%n%a,%d)"
# Just use Wkday,Day
cdate="$(date +%a,%d)"
export CLICOLOR
PS1="\w $newline$cdate$newline`whoami`"
case `id -u` in
0) PS1="${PS1}# ";;
*) PS1="${PS1}$ ";;
esac