*BSD News Article 68691


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mira.net.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.eng.convex.com!newsrelay.netins.net!solaris.cc.vt.edu!news.mathworks.com!uunet!in2.uu.net!csnews!coopnews.coop.net!hops.entertain.com!usenet
From: dwatson@abwam.com (Darryl Watson)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Path in prompt !!?? help!
Date: 16 May 1996 15:50:25 GMT
Organization: ABWAM, Inc.
Lines: 26
Message-ID: <4nfis1$8n2@hops.entertain.com>
References: <DrG8vz.HCE@student.twi.tudelft.nl>
NNTP-Posting-Host: 199.45.153.241
X-Newsreader: WinVN 0.92.5

In article <DrG8vz.HCE@student.twi.tudelft.nl>, "M.V. van der Star" <star> says:
>
>Hi, this may be a dumb question but I have recently installed FreeBSD 2.05
>and I wonder how to get my prompt to display the current directory !
>I have tried things like (from the top of my head) :
>
>set prompt = "$cwd -> "
>
>this sets the prompt to the directory I'm currently in but doesn't change when
>I move to a different directory !
>
>Please help, and if you can, also send your reply to me through e-mail.
>Thanks!!
>My e-mail address is : s795238@dutiwy.twi.tudelft.nl
>
>Ciao,
>Menno
>

Here are the pertinent entries in my .cshrc:

alias cd 'chdir \!* && set prompt="`hostname -s`:${cwd}% "'

if ($?prompt) then
        set prompt="`hostname -s`:${cwd}% "
endif