Date: Wed, 18 Oct 2000 13:44:57 +0300 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Roger Merritt <mcrogerm@stjohn.ac.th> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: setting prompt in tcsh Message-ID: <20001018134457.B302@gray.westgate.gr> 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 %2B0700 References: <3.0.6.32.20001018163847.007ab6b0@stjohn.stjohn.ac.th>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001018134457.B302>