Path: utzoo!utgpu!water!watmath!clyde!rutgers!ll-xn!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.unix.wizards Subject: Re: PS1 and PWD in david korn's shell Message-ID: <6856@brl-smoke.ARPA> Date: 16 Dec 87 21:42:54 GMT References: <13716@think.UUCP> <3299@ulysses.homer.nj.att.com> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB)) Distribution: na Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 13 In article <3299@ulysses.homer.nj.att.com> ekrell@hector (Eduardo Krell) writes: >In article <13716@think.UUCP> rlk@THINK.COM writes: >>now ask: How can I turn this behavior off? [ksh's "cd .."] >You can't unless you have source code. ksh does (what I believe is) >the right thing w.r.t. "cd .." in a symbolic link presence. Although I agree what the "right thing" is, the other behavior should be obtainable by redefining the "cd" command (via alias or function) to do a built-in "cd" to an absolute path obtained by chopping off the tail of whatever /bin/pwd returns, when the "cd" command's argument is "..". This is obviously a kludge, and it could probably be generalized, but it may be enough to satisfy the fellow who likes to find himselve in strange and exciting places.