Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Aug 1999 23:07:29 -0400
From:      Laurence Berland <stuyman@confusion.net>
To:        Mark Ovens <mark@dogma.freebsd-uk.eu.org>
Cc:        Subscriber to freebsd-questions <fbsdmail@sign.chg.ru>, Kenneth Legg <sce04020@mail.wvnet.edu>, freebsd-questions@FreeBSD.ORG
Subject:   Re: Prompt
Message-ID:  <37B62EF1.973F9C57@confusion.net>
References:  <99081410242902.00286@myname.my.domain> <Pine.BSF.4.05.9908150645340.84067-100000@sign.chg.ru> <19990815035813.C267@marder-1>

next in thread | previous in thread | raw e-mail | index | archive | help
On tcsh i'm using
set prompt=("%n@%m:%/ {%!} ")  
in the .cshrc
that gives you username, machine name, directory, and the history number
so for example
user@foo:/usr/bin {73} 

I don't know if it works under csh, but it's alot less work than using
hostname or pwd or other things like it, tcsh fills in the variables

Mark Ovens wrote:
> 
> On Sun, Aug 15, 1999 at 06:54:16AM +0400, Subscriber to freebsd-questions wrote:
> >
> >
> > On Sat, 14 Aug 1999, Kenneth Legg wrote:
> >
> > > How do you change the prompt to show the current directory?
> > >
> > >
> > > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > > with "unsubscribe freebsd-questions" in the body of the message
> > >
> >
> > If you use csh or tcsh, type this line in your .cshrc file :
> >
> >  set prompt = "`hostname -s`: %~ > "
> >
> > This also adds information about hostname (useful thing, when you have
> > accounts on several boxes).
> 
> Or add the following alias:
> 
> alias   cd      'cd \!*;set prompt="`hostname`:`pwd`{!}% "'
> 
> >                               Andrew.
> >
> >
> >
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-questions" in the body of the message
> >
> 
> --
>       FreeBSD - The Power To Serve http://www.freebsd.org
>       My Webpage http://http://ukug.uk.freebsd.org/~mark/
> _______________________________________________________________
> Mark Ovens, CNC Apps Engineer, Radan Computational Ltd. Bath UK
> CAD/CAM solutions for Sheetmetal Working Industry
> mailto:mark@ukug.uk.freebsd.org              http://www.radan.com
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message


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?37B62EF1.973F9C57>