Newsgroups: comp.unix.wizards Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!theory.TC.Cornell.EDU!lijewski From: lijewski@theory.TC.Cornell.EDU (Mike Lijewski) Subject: Re: pwd prompts in unix Message-ID: <1991Jun24.154628.20474@batcomputer.tn.cornell.edu> Sender: news@batcomputer.tn.cornell.edu Nntp-Posting-Host: theory.tc.cornell.edu Organization: Cornell National Supercomputer Facility References: <27275@adm.brl.mil> <1991Jun24.140512.6143@uokmax.ecn.uoknor.edu> Date: Mon, 24 Jun 1991 15:46:28 GMT In article <1991Jun24.140512.6143@uokmax.ecn.uoknor.edu> jkmedcal@uokmax.ecn.uoknor.edu (Jeff Medcalf) writes: > >ketell@tolkien (Gregory Ketell) writes: > >>CSH: >> Create two aliases in your .cshrc file >> alias cd 'cd \!*;promp' >> alias promp 'set prompt = "`hostname`:`pwd` ! > "' > >This could be done in a single alias: > > alias cd 'cd \!* ; set prompt = "`hostname`:`pwd` ! > "' > >and then follow this with a cd . command (which would stay in the cwd but >set the prompt. And if you want pushd and popd to work correctly, you'll probably need the following line: alias pushd 'pushd \!*; cd .'; alias popd 'popd; cd .'; >Jeff Medcalf jkmedcal@uokmax.{uucp|ecn.uoknor.edu} !chinet!uokmax!jkmedcal -- Mike Lijewski (H)607/272-0238 (W)607/254-8686 Cornell National Supercomputer Facility ARPA: mjlx@eagle.tc.cornell.edu BITNET: mjlx@cornellf.bitnet SMAIL: 25 Renwick Heights Road, Ithaca, NY 14850