Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!samsung!sdd.hp.com!ucsd!ucbvax!THOR.XRAYLITH.WISC.EDU!khan From: khan@THOR.XRAYLITH.WISC.EDU (Mumit Khan) Newsgroups: comp.unix.questions Subject: Re: Pathname in prompt, not FAQ, really. Message-ID: <9006122327.AA04898@thor.xraylith.wisc.edu> Date: 12 Jun 90 23:27:40 GMT References: Sender: daemon@ucbvax.BERKELEY.EDU Organization: Center for X-ray Lithography, UW-Madison Lines: 21 ::Namely, when I am in my home directory I want it to display a ~ ::instead of the path of my whole directory...secondly, I would like a ::prompt which when I hit cd and return would send me $home and change ::my prompt back to ~ I usually do the following on all our machines that doesn't have TCSH, and it works very nicely. I alias CD to the following: alias cd 'cd \!*; source ~/.prompt' where .prompt contains the following: #! /bin/csh -f set prompt="${USER}@${HOST} `pwd | sed 's?'${HOME}'?~?'`:\!>" works fine for me. I don't remember what was in the FAQ sheet, so please ignore if this has already been proposed. Having tcsh certainly helps, but this works ok for me on our AIX and SYSV machines. Mumit -- khan@xraylith.wisc.edu