Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!brl-adm!seismo!mcnc!ece-csc!uvacs!rwl From: rwl@uvacs.UUCP Newsgroups: comp.unix.questions Subject: Re: Korn Shell (alias for 'cd') Message-ID: <1341@uvacs.CS.VIRGINIA.EDU> Date: Thu, 26-Mar-87 11:24:38 EST Article-I.D.: uvacs.1341 Posted: Thu Mar 26 11:24:38 1987 Date-Received: Thu, 2-Apr-87 03:36:23 EST References: <580@csun.UUCP> <2295@tektools.TEK.COM> <350@houxa.UUCP> Organization: U.Va. CS in Charlottesville VA Lines: 25 Keywords: Korn shell ksh aliases parameters oops Summary: Be careful with the clash of aliases, functions, and builtins. > alias cd=chdir > chdir() > { > cd $1 > PS1="$PWD >" > } Actually, you have to quote the cd within chdir to retain it's orginal meaning. Otherwise you've set up a recursive call to the alias cd: alias cd=chdir function chdir { 'cd' $1 PS1="$PWD >" } I discover this while trying to modify cd to fit in with my pushd and popd functions. -- | Ray Lubinsky Department of Computer Science, University of Virginia | | INTERNET: rwl@uvacs.cs.virginia.edu | | CSNET: rwl%virginia@relay.cs.net | | UUCP: ...!cbosgd!uvacs!rwl |