Date: Thu, 7 Feb 2002 23:09:23 -0600 (CST) From: Lars Eighner <eighner@io.com> To: Bob Hall <rjhalljr@starpower.net> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: toor retoor (was toor?) Message-ID: <20020207225240.W22136-100000@dumpster.io.com> In-Reply-To: <20020207220755.B992@starpower.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 7 Feb 2002, Bob Hall wrote: >I've got bash set up to display the account, host, and current path. >When I log in as toor, it shows the script source instead of the >account-host-path info. Does anyone know how to get this working for >toor? I believe root is *not* supposed to use sh, and toor may use bash if desired. Here is how I do the prompts in that case (note: ^[ here is actually the ESC character in the file, long lines are broken twice with \): if [ "$USER" = "root" ] then PS1="^[[=4A^[[1;41;37m$(date) sh:$(tty):$USER $(hostname) $(pwd)#^[[0m^[[=1C" export PS1 xcd() { cd $* ; PS1="^[[=4A^[[1;41;37m$(date) sh:$(tty):$USER $(hostname) $(pwd)#^[[0m^[[=1C" ; export PS1 ; } alias cd='xcd' fi if [ "$LOGNAME" = "toor" ] then PS1='^[[=4A^[[=0G^[[=7F^[[1;41;37m\d \t \s\v:\l:$LOGNAME\n/ \H\w\$^[[0m^[[=1C' export PS1 fi if [ "$UID" -ne 0 ] then PS1='^[[=9A^[[=0G^[[=7F^[[1;37;44m\d \t \s\v:\l:$LOGNAME\n/ \H\w\$^[[0m^[[=1C' export PS1 fi UID 0 prompts (root and toor) are white on red with a red frame around the screen, others are white on blue with a blue frame. As near as I know how to make them alike the prompts are Date shell:tty:logname hostname current path #/$ -- Lars Eighner eighner@io.com -finger for geek code- http://www.io.com/~eighner/index.html 700 Hearn #101 Austin TX 78703 (512)474-1920 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020207225240.W22136-100000>