Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jul 2004 20:39:24 +0300
From:      Ion-Mihai Tetcu <itetcu@apropo.ro>
To:        Dan <longterm@pdx.chatusa.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: freeBSD How to you set the prompt
Message-ID:  <20040729203924.211d63d5@it.buh.tecnik93.com>
In-Reply-To: <000801c47570$25df3ab0$ca2aeecd@dannewxp>
References:  <000801c47570$25df3ab0$ca2aeecd@dannewxp>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 29 Jul 2004 13:29:30 -0000
"Dan" <longterm@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@short_hostname> current_path [current_time] last_command_exit_code
_#_

itetcu@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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040729203924.211d63d5>