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