rox-fm

Polytropon freebsd at edvax.de
Thu May 5 12:56:29 UTC 2011


On Thu, 05 May 2011 09:43:04 +0000, pwnedomina <pwnedomina at gmail.com> wrote:
> ok, ive choosen "reply to all". my question now is
> i have setted the command prompt to
> "|[%n@%m:%c]%#"
> but i intend to place color red in the [] brackets, how can i accomplish 
> this?|

It looks like you are configuring a C shell prompt, correct?
Make sure you have the following settings in ~/.cshrc (or in
/ect/csh.cshrc, if you want a global setting):

	set promptchars = "%#"
	set prompt = "%n@%m:%~%# "

This would give you the STANDARD prompt - note the space after
the prompt character and the absense of the brackets.

You want red color - I'm not sure if this is supported in csh.
At least I know that bold printing is possible. Have a look
at this:

	set prompt = "[%B%n@%m:%~%b]%# "

This uses %B and %b to switch on and off bold printing. Refer
to "man csh", section "Special shell variables" and scroll
down to "prompt" - there are some more special settings to
customize the prompt. It mentions "%{string%}" for escape
sequences and can MAYBE be used for changing color.

Is the pipe character at the beginning of the prompt intended?
If yes, use this:

	set prompt = "|[%B%n@%m:%~%b]%# "

I've kept the space at the end of the prompt for better
readability. Remove it if desired.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list