From owner-freebsd-questions Wed Oct 18 3:45:45 2000 Delivered-To: freebsd-questions@freebsd.org Received: from gray.westgate.gr (gray.westgate.gr [212.205.119.66]) by hub.freebsd.org (Postfix) with ESMTP id 0CCDD37B4CF for ; Wed, 18 Oct 2000 03:45:28 -0700 (PDT) Received: (from charon@localhost) by gray.westgate.gr (8.11.1/8.11.1) id e9IAivZ00468; Wed, 18 Oct 2000 13:44:57 +0300 (EEST) Date: Wed, 18 Oct 2000 13:44:57 +0300 From: Giorgos Keramidas To: Roger Merritt Cc: freebsd-questions@FreeBSD.ORG Subject: Re: setting prompt in tcsh Message-ID: <20001018134457.B302@gray.westgate.gr> References: <3.0.6.32.20001018163847.007ab6b0@stjohn.stjohn.ac.th> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3.0.6.32.20001018163847.007ab6b0@stjohn.stjohn.ac.th>; from mcrogerm@stjohn.ac.th on Wed, Oct 18, 2000 at 04:38:47PM +0700 X-PGP-Fingerprint: 3A 75 52 EB F1 58 56 0D - C5 B8 21 B6 1B 5E 4A C2 X-URL: http://students.ceid.upatras.gr/~keramida/index.html Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Oct 18, 2000 at 04:38:47PM +0700, Roger Merritt wrote: > > Using bash I set PS1 to "[\u@\h:\w]" and then test to see if I'm root > or not to add '$' or '#'. This gives me a nice prompt like > '[acharn@ceres:/usr/ports/security]$ ', which is useful because I have > two machines I telnet to and it's nice to be reminded if I've su'd to > root and just what directory I'm currently in. I've been going through > man 1 tcsh and haven't found anything similar, and I can't find the > web site I ran across a couple of months ago which had unix tutorials, > including one on shells. > > Can anyone help me out with an expression to put in .cshrc or .tcshrc > so I can get a similar prompt in tcsh? After playing with it a little > bit I've decided I should restore it as the shell for root (since tcsh > lives in /bin). I think that I got what you want: % set prompt = '[%n@%m:%~]%# ' [charon@gray:~]> su Password: gray# set prompt = '[%n@%m:%~]%# ' [charon@gray:/home/charon]# exit For more details, see the manpage of tcsh(1). Ciao :) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message