Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!haven!adm!xadmx!TAYENGSI%NUSDISCS.BITNET@cunyvm.cuny.edu, "Marvin Tay"@BRL.MIL From: TAYENGSI%NUSDISCS.BITNET@cunyvm.cuny.edu,Marvin Tay@BRL.MIL Newsgroups: comp.unix.questions Subject: UNIX prompts (-ksh) Message-ID: <18805@adm.BRL.MIL> Date: 23 Mar 89 20:43:55 GMT Sender: news@adm.BRL.MIL Lines: 38 To all prompt enthusiasts, I hope this is not too late an entry. In an earlier article, Brian Fristensky sez' >> In MS-DOS there is a very easy way to get the current directory displayed as >> part of the prompt (prompt $p). In UNIX, there is certainly no >> straightforward way to do this. Can anyone think of a tricky way? Well, for all Korny (bad pun!) users, we have a rather simple solution which is to include the following line in your .profile : PS1='"$PWD" >' Neat huh ? Aliases gave me some problems at first so an alternative is to use a shell function like this : ncd () { cd $1; PS1='"$PWD" >' ;} Anymore suggestions ? Note: ncd is derived from chronic over-dependence on my PC's Norton Utilities. +------------------------ Marvin Tay tayengsi@nusdiscs.bitnet Disclaimer : I am just an innocent harmless student expressing innocent harmless views. HENCE, any views expressed are entirely my own and in no way reflect those held by the esteemed institution that I belong to. " .....uucp is unheard of in this region.....and Singapore is *NOT* in China..............." +------------------------