Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!solace!news.stealth.net!www.nntp.primenet.com!nntp.primenet.com!dispatch.news.demon.net!demon!awfulhak.demon.co.uk!awfulhak.demon.co.uk!awfulhak.demon.co.uk!not-for-mail
From: brian@anorak.coverform.lan (Brian Somers)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Prompt won't show `pwd`
Date: 5 Nov 1996 01:09:11 -0000
Organization: Coverform Ltd.
Lines: 22
Sender: brian@awfulhak.demon.co.uk
Message-ID: <55m43n$447@anorak.coverform.lan>
References: <327D7D20.1467@auburn.campus.mci.net>
Reply-To: brian%anorak.coverform.lan@awfulhak.demon.co.uk
NNTP-Posting-Host: anorak.coverform.lan
X-NNTP-Posting-Host: awfulhak.demon.co.uk
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Newsreader: knews 0.9.8
In article <327D7D20.1467@auburn.campus.mci.net>,
Anthony Jenkins <ajenkins@auburn.campus.mci.net> writes:
: How do I get my shell prompt (csh or sh) to show the current working
: directory every time it is printed? Setting prompt to "`pwd`#" only
: sets the prompt to the directory I am in when I issue the set command;
: cd-ing to another directory doesn't affect the prompt. Thanks in
: advance.
You can
cd(){ chdir $*; PS1="`pwd` $ "; }
cd .
in sh (ash), and I don't know anything about csh.
You're really better off using a real shell such as bash, pdksh or zsh.
--
Brian <brian%anorak.coverform.lan@awfulhak.demon.co.uk>
<http://www.awfulhak.demon.co.uk/>
Don't _EVER_ lose your sense of humour....
.