Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnews!lvc From: lvc@cbnews.att.com (lawrence.v.cipriani) Newsgroups: comp.unix.shell Subject: Re: ksh prompt Message-ID: <1991Mar4.133215.12269@cbnews.att.com> Date: 4 Mar 91 13:32:15 GMT References: <1772@brchh104.bnr.ca> <1991Feb28.173758.21195@en.ecn.purdue.edu> <57517@mcdchg.chg.mcd.mot.com> Organization: Ideology Busters, Inc. Lines: 29 In article <57517@mcdchg.chg.mcd.mot.com> heiby@mcdchg.chg.mcd.mot.com (Ron Heiby) writes: ># Define the replacement for the "cd" builtin >function ch { > if cd ${*:-''} > then > resetps1 > else > return 1 > fi >} >alias cd=ch # make it easy to use I suggest the cd in function ch be quoted: function ch { if "cd" ${*:-''} then resetps1 else return 1 fi alias cd=ch so that a second ". $ENV" will not see 'ch' inside of function ch. Why not use "${@:-''}" instead of ${*:-''} ? -- Larry Cipriani, att!cbvox!lvc or lvc@cbvox.att.com "Fight fire with fire, I always say" -- Bugs Bunny