home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / shell / 5204 < prev    next >
Encoding:
Text File  |  1992-12-31  |  1.1 KB  |  32 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!munnari.oz.au!bruce.cs.monash.edu.au!monu6!giaeb!s1110238
  3. From: s1110238@giaeb.cc.monash.edu.au (Lee Hollingworth)
  4. Subject: Re: pwd
  5. Message-ID: <s1110238.725793281@giaeb>
  6. Sender: news@monu6.cc.monash.edu.au (Usenet system)
  7. Organization: Monash University, Melb., Australia.
  8. References: <1992Dec31.022725.13611@netcom.com>
  9. Date: Thu, 31 Dec 1992 09:14:41 GMT
  10. Lines: 20
  11.  
  12. kasajian@netcom.com (Kenneth Kasajian) writes:
  13.  
  14. >Hello.  I'm using tcsh as my shell.  I was wondering..  how do I get
  15. >the prompt to show my local directory like in dos PROMPT $P$G
  16. >I've tried:
  17. >prompt `pwd`
  18. >but the prompt is set to the directory name at the time of the setting
  19. >and doesn't change when change directories.  How do I get it to
  20. >execute everytime.  can I overwrite 'cd' ?
  21.  
  22. Try adding an alias or two to your .cshrc file.
  23.  
  24. # Set up sensible prompt and a few alii
  25. alias cd 'cd \!* ; set prompt = "$cwd> "'
  26. alias pop 'popd \!* ; set prompt = "$cwd> "'
  27. alias pushd 'pushd \!* ; set prompt = "$cwd> "'
  28. cd .
  29.  
  30. Lee Hollingworth
  31. s1110238@giaeb.cc.monash.edu.au
  32.