From owner-freebsd-questions@FreeBSD.ORG Thu May 5 17:20:50 2011 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8944106564A for ; Thu, 5 May 2011 17:20:50 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 63A1D8FC13 for ; Thu, 5 May 2011 17:20:50 +0000 (UTC) Received: from r55.edvax.de (port-92-195-63-204.dynamic.qsc.de [92.195.63.204]) by mx01.qsc.de (Postfix) with ESMTP id 9B8CC3CE08; Thu, 5 May 2011 19:20:48 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id p45HKlXo001525; Thu, 5 May 2011 19:20:48 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Thu, 5 May 2011 19:20:47 +0200 From: Polytropon To: pwnedomina Message-Id: <20110505192047.137782cb.freebsd@edvax.de> In-Reply-To: <4DC2CCD7.3080406@gmail.com> References: <4DC1BEA8.6030108@gmail.com> <20110504224931.9ffd5682.dcdowse@gmx.net> <4DC1E23E.3020001@gmail.com> <20110505014556.50dcea0e.dcdowse@gmx.net> <4DC27128.8040508@gmail.com> <20110505143748.4be94f6f.freebsd@edvax.de> <4DC2CCD7.3080406@gmail.com> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: questions@freebsd.org Subject: Re: rox-fm X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 17:20:50 -0000 On Thu, 05 May 2011 16:14:15 +0000, pwnedomina wrote: > according to this page http://understudy.net/custom.html 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 section http://understudy.net/custom.html#color_prompts 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 http://understudy.net/custom.html#table2 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. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...