Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!gatech!ncsuvx!ece-csc!ncrcae!usceast!dean From: dean@usceast.UUCP (Dean Karres) Newsgroups: comp.unix.wizards Subject: Re: Csh prompt Message-ID: <2721@usceast.UUCP> Date: 10 Feb 89 05:24:37 GMT References: <35782@bbn.COM> Reply-To: dean@usceast.UUCP (Dean Karres) Organization: University of South Carolina, Columbia Lines: 47 In article <35782@bbn.COM> sboisen@bbn.com writes: >>In article <739@umb.umb.edu> pme@umb.edu (Paul English) writes: >>>... >>> alias . echo `hostname`: `dirs` >>... >My solution is to put only the last part of the directory into the >prompt: I came across this posting this evening so if my suggestion has already been posted and rejected please forgive :-) On the BSD/Ultrix/SUN OS boxes that I deal with my prompt is set as follows: set host = `hostname` set prompt = "$host - `pwd`\ % " alias cd 'cd \!*; set prompt = "$host - `pwd`\\ % "' alias po 'popd; set prompt = "$host - `pwd`\\ % "' alias pu 'pushd \!*; set prompt = "$host - `pwd`\\ % "' This gives me the ability to have complete, though potentially long, paths showing that do not interfear with my command line. The general effect is: monster - /usr/local/not-so-local/.../.../.../.../.../.../... % I do the "set host = `hostname`" because I think that the variable substitution is "faster" than the "hostname" evaluation. I do not know this for a fact. Dean...k... -- Dean Karres US-Mail: Math & Stat Comp Cntr, Math Dept, USC, Columbia, SC 29208 E-Mail: ...{gatech!hubcap, mcnc!ece-csc}!ncrcae!usceast!dean - or -: relay.cs.net!cs.scarolina.edu!dean -- E-Mail: ...{gatech!hubcap, mcnc!ece-csc}!ncrcae!usceast!dean =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Adaz sighed, "So how long will this trip take?" "A month?" Sutekh shrugged. "Depends on when the horses die."