home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / shell / 3955 < prev    next >
Encoding:
Text File  |  1992-09-15  |  1.9 KB  |  48 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!stanford.edu!snorkelwacker.mit.edu!bloom-picayune.mit.edu!news.mit.edu!jdell
  3. From: jdell@indira.mit.edu (John Ellithorpe)
  4. Subject: Re: Need help putting PWD in PROMPT
  5. In-Reply-To: rhoro@muug.mb.ca's message of 14 Sep 92 02:37:06 GMT
  6. Message-ID: <JDELL.92Sep15105545@indira.mit.edu>
  7. Sender: news@athena.mit.edu (News system)
  8. Nntp-Posting-Host: indira.mit.edu
  9. Organization: Massachusetts Institute of Technology
  10. References: <1992Sep8.152514.24851@orlith.bates.edu> <1992Sep13.154528.3369@muug.mb.ca>
  11.     <1992Sep14.023706.6385@muug.mb.ca>
  12. Date: Tue, 15 Sep 1992 15:55:45 GMT
  13. Lines: 33
  14.  
  15. On 14 Sep 92 02:37:06 GMT, rhoro@muug.mb.ca (Rick Horocholyn) said:
  16.  
  17. > In <1992Sep13.154528.3369@muug.mb.ca> rhoro@muug.mb.ca (Rick Horocholyn) writes:
  18. > In <1992Sep8.152514.24851@orlith.bates.edu> pbeach@abacus.bates.edu (Preston Beach) writes:
  19. >>  I want to get my prompt to give my current working directory all the time.
  20. > If you use pushd/popd at all, you'll also want to set aliases for them too:
  21. > alias cd 'cd \!*; set prompt = "\! $cwd> "
  22. > alias pushd 'pushd \!*; set prompt = "\! `pwd`> "'
  23. > alias pop 'popd; set prompt = "\! `pwd`> "'
  24.  
  25. If you are using tcsh (or some other flavor of shell), you can just set the
  26. prompt to whatever you want:
  27.  
  28.     % set prompt='%/>'
  29.  
  30. and it give you:
  31.  
  32.     /home/maggie/jdell>
  33.  
  34. for the prompt.  Tcsh also lets you specify hostnames, times, dates, current
  35. history event numbers.  Also underlining and boldfacing, if supported.  I'm
  36. using Tcsh 6.02.
  37.  
  38. John
  39.  
  40. --
  41.  
  42. ===============================================================================
  43. John Ellithorpe                           | Internet: jdell@maggie.mit.edu
  44. Dept. of Physics, Rm 26-349               | Phone   : (617) 253-3074  Office
  45. Massachusetts Institute of Technology     |           (617) 253-3072  Lab
  46. Cambridge, MA  02139                      |           (617) 236-4910  Home
  47. ===============================================================================
  48.