Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!esmeralda.access.net.au!news.netspace.net.au!news.mira.net.au!news.vbc.net!vbcnet-west!news13.agis.net!agis!newspeer1.agis.net!agis!news3.agis.net!agis!cancer.vividnet.com!hunter.premier.net!www.nntp.primenet.com!nntp.primenet.com!nntp.uio.no!news.cais.net!in1.nntp.cais.net!news.structured.net!crusty.teleport.com!news.serv.net!not-for-mail From: zeno@serv.net (Sean T. Lamont .) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: Prompt won't show `pwd` Date: 4 Nov 1996 21:07:31 -0800 Organization: ServNet Internet Services, Seattle, WA Lines: 30 Message-ID: <55mi2j$oci@itchy.serv.net> References: <327D7D20.1467@auburn.campus.mci.net> NNTP-Posting-Host: itchy.serv.net In article <327D7D20.1467@auburn.campus.mci.net>, Anthony Jenkins <ajenkins@auburn.campus.mci.net> wrote: >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. I think this is a comp.unix faq somewhere. If you aren't too hung up on csh, get tcsh ; it provides these facilities automatically (date/directory, etc.) by special characters in the prompt. Otherwise you have to do something like alias cd 'chdir \!:1 ; set prompt = `pwd`%' for every session you want to do this in. -- Sean T. Lamont, President / Chief NetNerd, Abstract Software, Inc. (ServNet) - Internet access * WWW hosting * TCP/IP * UNIX * NEXTSTEP * WWW Development - email: lamont@abstractsoft.com WWW: http://www.serv.net "...There's no moral, it's just a lot of stuff that happens". - H. Simpson