Path: utzoo!utgpu!water!watmath!clyde!cbosgd!osu-cis!tut!lvc From: lvc@tut.cis.ohio-state.edu (Lawrence V. Cipriani) Newsgroups: comp.unix.wizards Subject: Re: PS1 and PWD in david korn's shell Summary: aliases and functions Message-ID: <3268@tut.cis.ohio-state.edu> Date: 16 Dec 87 18:25:40 GMT References: <13716@think.UUCP> Distribution: na Organization: Ohio State Computer & Info Science Lines: 31 In article <13716@think.UUCP>, rlk@think.COM (Robert Krawitz) writes: >Now, my complaint: ksh interprets pwd and cd .. itself. The former I >can live with; I need merely use /bin/pwd. ... > How can I turn this behavior off? ... > bloom-beacon > |think!rlk Robert KrawitzPut this alias and function in your ENV file: alias cd=chdir function chdir { "cd" "${@}" && PWD=$(/bin/pwd) } When you type: cd [dirs] the function chdir is executed with whatever argument(s) given to the cd alias. The chdir function uses the real cd (note the "cd") and then sets PWD to the value returned by /bin/pwd. I tried it, it works (on Version 06/03/86) (but is noticeably slower). Some combination of aliases and functions will usually let you do whatever you want when one or the other isn't sufficient. -- Larry Cipriani AT&T Network Systems at cbosgd!osu-cis!tut!lvc Ohio State University