Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!psuvax1!rutgers!mcdchg!heiby From: heiby@mcdchg.chg.mcd.mot.com (Ron Heiby) Newsgroups: comp.unix.shell Subject: Re: ksh prompt Message-ID: <58106@mcdchg.chg.mcd.mot.com> Date: 7 Mar 91 22:35:47 GMT References: <1991Mar4.133215.12269@cbnews.att.com> <57993@mcdchg.chg.mcd.mot.com> <7365@mentor.cc.purdue.edu> <1991Mar6.050338.7038@ims.alaska.edu> Organization: Motorola Computer Group, Schaumburg, IL Lines: 24 In article <7365@mentor.cc.purdue.edu> asg@sage.cc.purdue.edu (The Grand Master) writes: >WHY DO YOU WANT TO MAKE IT SO HARD????? >The $PWD variable changes when you cd. >ksh provides for another eval of the prompt string before printing it, >so all you have to do is quote the $ in $PWD like this: >PS1="\$PWD ->" >this will give you a prompt that includes the current directory and >is dynamic - and it is alot easier than a whole bunch of >kludged functions. Yup. I suppose that if all you want is the absolute pathname of your current working directory, then all you have to do is something like you suggest. Of course, there are some long pathnames out there. I find on my system one that would give a prompt string (with your suggestion) something like: /src68/usr/src/cmd/sadmin/admin/menu/diagnostics/diskrepair/badtrack -> That doesn't leave much room for typing a command! Also, it doesn't provide any of the other things that have been integrated into the "monster" prompt that many people have found useful. -- Ron Heiby, heiby@chg.mcd.mot.com Moderator: comp.newprod "Wrong is wrong, even when it helps you." Popeye