home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!gossip.pyramid.com!pyramid!infmx!hartman
- From: hartman@informix.com (Robert Hartman)
- Newsgroups: comp.unix.shell
- Subject: Re: Novice Unix user help
- Message-ID: <1992Dec17.030749.321@informix.com>
- Date: 17 Dec 92 03:07:49 GMT
- References: <101787@netnews.upenn.edu> <1992Dec14.214005.15179@brtph560.bnr.ca>
- Sender: news@informix.com (Usenet News)
- Organization: Informix Software, Inc.
- Lines: 31
-
- In article <1992Dec14.214005.15179@brtph560.bnr.ca> esh@bnr.ca (Jim Eshelman P910) 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 ?
- >|>
- >If you are in CSH, you can try:
- >
- > alias cd 'cd \!*; set prompt = "{`pwd`}<\! >"'
-
- Maybe it's just me, but I find that prompt business to be quite
- annoying. I also find that I can remember what directory I'm in as
- long as I stay there. It's only when I move that I need to know.
- So I just alias cd like this:
-
- alias cd 'cd \!*; echo $cwd'
-
- I also define "." as an alias for 'echo $cwd', so that when I do
- happen to forget, I can get a reminder in 2 keystrokes.
-
- (When I'm in ksh, I use "," instead.)
-
- >but note that most of the gurus out there will likely ignore your question
- >since this kind of info is in the Frequently Asked Questions (FAQ) files
- >which were posted just last week. Get a copy & study before venturing here
- >as a novice -- and provide more detail on the system you are using.
-
- Yup. One thing to remember about UNIX, although you can usually
- make it do what you want, sometimes it's less trouble to find an
- alternative method that will accomplish the same thing.
-
- -r
-