Path: utzoo!attcan!uunet!know!zaphod.mps.ohio-state.edu!wuarchive!udel!rochester!pt.cs.cmu.edu!dsl.pitt.edu!pitt!darth!investor.pgh.pa.us!rbp From: rbp@investor.pgh.pa.us (Bob Peirce #305) Newsgroups: comp.unix.shell Subject: Re: Csh question: Doing cd .. from a symbolically linked directory Message-ID: <1990Oct31.164203.20518@investor.pgh.pa.us> Date: 31 Oct 90 16:42:03 GMT References: <8049@star.cs.vu.nl> <8060@star.cs.vu.nl> Reply-To: rbp@investor.pgh.pa.us (Bob Peirce #305) Distribution: comp.unix.shell Organization: Cookson, Peirce & Co., Pittsburgh, PA Lines: 17 In article <8060@star.cs.vu.nl> maart@cs.vu.nl (Maarten Litmaath) writes: >--------------------cut here-------------------- >alias cd 'set tmp=(\!*); eval _cd_$#tmp $cwd \!*//. ../ ~; echo $cwd' >alias _cd_0 'chdir \!$' >alias _cd_1 'if (x\!:2 !~ x../*) set status=1'\ > '&& eval _cd_x /\!^:h \!:2-:s-../--'\ > '|| chdir \!:2:h' >alias _cd_x 'if (x\!:2 !~ x../*) set status=1'\ > '&& eval _cd_x /\!^:h \!:2*:s-../--'\ > '|| chdir \!^/\!:2:h' >alias pwd 'echo $cwd' >--------------------cut here-------------------- What do you do if your csh doesn't have eval and doesn't set cwd? -- Bob Peirce, Pittsburgh, PA 412-471-5320 ...!uunet!pitt!investor!rbp rbp@investor.pgh.pa.us