Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!murphy!jpradley!jpr From: jpr@jpradley.uucp (Jean-Pierre Radley) Newsgroups: comp.unix.xenix.sco Subject: Re: cwd help needed Message-ID: <1990Oct15.003741.7588@jpradley.uucp> Date: 15 Oct 90 00:37:41 GMT References: <1084@ria.ccs.uwo.ca> <1990Oct6.233758.7959@cjbsys.bdb.com> Reply-To: jpr@jpradley.UUCP (Jean-Pierre Radley) Distribution: comp.unix.xenix.sco Organization: High-Q Lines: 28 In article <1990Oct6.233758.7959@cjbsys.bdb.com> cliffb@cjbsys.bdb.com (cliff bedore) writes: >In article <1084@ria.ccs.uwo.ca> creider@uwocsd.uwo.ca (Chet Creider) writes: >>Would someone help a newuser? How does one write the equivalent to >>the familiar: >> alias cd 'cd \!* ; echo $cwd' >> >>i.e., is there an equivalent to $cwd (csh, SCO OS)? > >The following works > > set prompt="`pwd` : " # set prompt string > alias cd 'cd \!*;set prompt = "`pwd` : "' Some one asked me for a fancy two-line prompt, such as: alias cd 'cd \!* ; set prompt="`pwd` \\\ `tput smso``logname` \\!>`tput rmso`"' If you really want such a thing, then speed it up: set SMSO = `tput smso` set RMSO = `tput rmso` set LOGNAME = `logname` alias cd 'cd \!* ; set prompt = "`pwd` \\\ $SMSO$LOGNAME \\!>$RMSO"' -- Jean-Pierre Radley HIGH-Q jpr@jpradley CIS: 72160,1341