Csh question: Doing cd .. from a symbolically linked directory
Bob Peirce #305
rbp at investor.pgh.pa.us
Thu Nov 1 03:42:03 AEST 1990
In article <8060 at star.cs.vu.nl> maart at 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 at investor.pgh.pa.us
More information about the Comp.unix.shell
mailing list