Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 May 2011 19:20:47 +0200
From:      Polytropon <>
To:        pwnedomina <>
Subject:   Re: rox-fm
Message-ID:  <>
In-Reply-To: <>
References:  <> <> <> <> <> <> <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Thu, 05 May 2011 16:14:15 +0000, pwnedomina <> wrote:
> according to this page C shell support 
> colors, how can i turn this prompt
> set prompt = "[%B%n@%m:%~%b]%# "
> with red color on brackets and white color on text?

Have a look at the page you mentioned above and you'll
easily find the answer, especially if you consult the

and then scroll down to "TC Shells" - keep in mind that
FreeBSD's C shell is a TC shell (/bin/csh and /bin/tcsh
are the same program).

I've tried the example (on FreeBSD 7) from the web page
you mentioned and found that

	set prompt = "%{\033[31m%}[%{\033[0m%}%B%n@%m:%~%b%{\033[31m%}]%{\033[0m%}%# "

works as intended. %{\033[31m%} switches red color on, and
%B/%b applies bold face for the text inside the brackets.

In the section

you'll find a reference for the other colors "programming
codes". You could, for example, use a different color for
root and nonroot shells, or change color depending on specific
shell accounts on your system.

You can also use other attributes like %S/%s for standout
(here: inverse) mode, or %U/%u for underline mode. However,
not every terminal (emulator) is capable of displaying them
as intended, for example the text mode console cannot do
unterlining, vt100 can do blinking _and_ underlining, but
can't do colors, xterm can do underlining, but _not_ blinking,
but can do colors... and so on.

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

Want to link to this message? Use this URL: <>