home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / shell / 5096 < prev    next >
Encoding:
Text File  |  1992-12-16  |  1.6 KB  |  41 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!pipex!warwick!coventry!champion
  3. From: champion@cch.coventry.ac.uk (Alun)
  4. Subject: Re: Novice Unix user help
  5. Message-ID: <BzDKHG.7q4@cck.coventry.ac.uk>
  6. Sender: news@cck.coventry.ac.uk (news user)
  7. Nntp-Posting-Host: cc_sysh
  8. Organization: Coventry University, Coventry, UK.
  9. References: <101787@netnews.upenn.edu> <BzD5yp.B2H@cs.mcgill.ca>
  10. Date: Wed, 16 Dec 1992 23:12:52 GMT
  11. Lines: 28
  12.  
  13. In article <BzD5yp.B2H@cs.mcgill.ca> popaul@binkley.cs.mcgill.ca writes:
  14. ~In article <101787@netnews.upenn.edu> ericj@eniac.seas.upenn.edu (Eric J  
  15. ~Reiter) writes:
  16. ~> Can anyone tell me how I can change my prompt to display what directory I am 
  17. ~> in; i.e. like DOS set prompt=$p$g ?
  18. ~ As you have tcsh (thanks to finger :) ) you have to patch your cd command with
  19. ~ an alias in your .cshrc (or put all your alias in a .alias file and put a 
  20. ~ "source .alias" in your .cshrc). The alias look like :
  21. ~ alias cd        'cd \!*;  set prompt="[`hostname`][$cwd] "'
  22. ~
  23. ~ That will do it. Next time, say what shell you're using so I will not need to
  24. ~ do a finger... (BTW, beautiful .plan)
  25.  
  26. Why ?? Have I missed something ??
  27. If you are running tcsh just.
  28.  
  29. set prompt = "%/ > "
  30.  
  31. And if you want the hostname just add %M (short) or %m (long) to your prompt.
  32. Theres loads more funky stuff you can do with your prompt - check the manual.
  33.  
  34.   -Alun
  35.  
  36. -- 
  37.   *I'm as bad as the worst - but thank God(?) I am as good as the best.*
  38.     *People who think they know everything annoy those of us that do.*
  39. A.Champion                |  That's an interesting point, in the sense of
  40. (champion@uk.ac.cov.cch)  |    being very not interesting at all. - The Liar
  41.