Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!ncar!gatech!purdue!mentor.cc.purdue.edu!noose.ecn.purdue.edu!en.ecn.purdue.edu!nichols From: nichols@en.ecn.purdue.edu (Scott P Nichols) Newsgroups: comp.unix.shell Subject: Re: ksh prompt Message-ID: <1991Feb28.173758.21195@en.ecn.purdue.edu> Date: 28 Feb 91 17:37:58 GMT References: <1772@brchh104.bnr.ca> Organization: Purdue University Engineering Computer Network Lines: 27 In article <1772@brchh104.bnr.ca> herrage@brchh107.BNR.CA writes: >I have the following defined in my .profile: > > alias prompt="PS1=\"--> \`pwd\` <-- > hostname> \"" > >This sets my prompt to put my current directory on one line >and my prompt below it on the next line. I also want to have >an alias (or something) for "cd" so that when I use "cd" to >change directories, my prompt will update accordingly. The >problem is that when I alias "cd", ksh doesn't parse for any >imbedded aliases. Therefore, > > alias cd='cd $*;prompt' > How about... PS1='\!]$PWD>' ...works for me! Scott -- O- /\ |\ /\/vv\ /vv\ \ __Insight from Oregon...Scott P. Nichols _____/ \ ~~~~~~~~~~~~~~~~ (nichols@en.ecn.purdue.edu)