freeBSD How to you set the prompt

Ion-Mihai Tetcu itetcu at apropo.ro
Thu Jul 29 14:50:12 PDT 2004


On Thu, 29 Jul 2004 13:29:30 -0000
"Dan" <longterm at pdx.chatusa.com> wrote:

> Where and how do you set the prompt to show what user name that  your  on IE ROOT or user johndoe.
> Eample of what the end results I would like to see.
> 
> # router1.pdx/chatusa.com user johndoe.

In tch I use this prompt (which also has some colors taht I cannot
reproduce here):

user at short_hostname> current_path [current_time] last_command_exit_code
_#_

itetcu at it> /usr/ports/converters/php4-recode [20:35:57] 0                                         
_ #_

which is done by adding this two lines in ~/.cshrc
        set prompt = "%S%n@`hostname -s`> %{\e[0;31m%}%/%{\e[0m%} [%P] %{\e[1;36m%}%?%{\e[0m%}
                                   %s\n%B%U %{\e[0;31m%}#%{\e[0m%} %u%b"


-- 
IOnut
Unregistered ;) FreeBSD "user"



More information about the freebsd-questions mailing list