home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / shell / 5089 < prev    next >
Encoding:
Internet Message Format  |  1992-12-16  |  1.4 KB

  1. Path: sparky!uunet!olivea!charnel!sifon!homer.cs.mcgill.ca!news
  2. From: popaul@cs.mcgill.ca (Paul TERRAY)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: Novice Unix user help
  5. Message-ID: <BzD5yp.B2H@cs.mcgill.ca>
  6. Date: 16 Dec 92 17:59:13 GMT
  7. References: <101787@netnews.upenn.edu>
  8. Sender: news@cs.mcgill.ca (Netnews Administrator)
  9. Reply-To: popaul@binkley.cs.mcgill.ca
  10. Organization: SOCS, McGill University, Montreal, Canada
  11. Lines: 20
  12.  
  13. In article <101787@netnews.upenn.edu> ericj@eniac.seas.upenn.edu (Eric J  
  14. Reiter) writes:
  15. > Can anyone tell me how I can change my prompt to display what directory I am 
  16. > in; i.e. like DOS set prompt=$p$g ?
  17. As you have tcsh (thanks to finger :) ) you have to patch your cd command with
  18. an alias in your .cshrc (or put all your alias in a .alias file and put a 
  19. "source .alias" in your .cshrc). The alias look like :
  20. alias cd        'cd \!*;  set prompt="[`hostname`][$cwd] "'
  21.  
  22. That will do it. Next time, say what shell you're using so I will not need to
  23. do a finger... (BTW, beautiful .plan)
  24.  
  25. Pauly prompt to display what directory I am 
  26. > in; i.e. like DOS set prompt=$p$g ?
  27. As you have tcsh (thanks to finger :) ) you have to patch your cd command with
  28. an alias in your .cshrc (or put all your alias in a .alias file and put a 
  29. "source .alias" in your .cshrc). The alias look like :
  30. alias cd        'cd \!*;  set prompt="[`hostname`][$cwd] "'
  31.  
  32. That will do it. Next time, say what shell you're using so I will 
  33.