Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!hpb.cis.pitt.edu!skeeve From: skeeve@hpb.cis.pitt.edu (John Huffman) Newsgroups: comp.unix.questions Subject: Re: $cwd in prompt??? Keywords: C-Shell Message-ID: <141186@unix.cis.pitt.edu> Date: 18 Jun 91 15:16:54 GMT References: <17153@darkstar.ucsc.edu> Sender: news@unix.cis.pitt.edu Distribution: comp.unix.questions Organization: Univ. of Pittsburgh -- Panther Amateur Radio Club Lines: 21 In article <17153@darkstar.ucsc.edu> bjsvec@cats.ucsc.edu (Brandon Jason Svec) writes: > > >Can someone tell me how to get my prompt to show the current working directory? > >I have tried something like this: > >alias cd "cd;set prompt = $cwd" # so it will update each time I cd >set prompt = $cwd I use the following in my .cshrc: alias setprompt 'set prompt="`/usr/ucb/hostname`:`pwd`#\\!>"' alias cd 'chdir \!* && setprompt' alias pushd 'pushd \!* && setprompt' alias popd 'popd \!* && setprompt' setprompt This takes care of at least most of the cases. - John Huffman