Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ncoast.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!cwruecmp!hal!ncoast!allbery From: allbery@ncoast.UUCP (Brandon Allbery) Newsgroups: net.sources Subject: @#@#** YOUR SUBJECT HERE **#@#@ Message-ID: <1042@ncoast.UUCP> Date: Fri, 28-Feb-86 20:16:01 EST Article-I.D.: ncoast.1042 Posted: Fri Feb 28 20:16:01 1986 Date-Received: Sat, 1-Mar-86 23:28:22 EST References: <73@cselt.UUCP> <5041@alice.uUCp> Reply-To: allbery@ncoast.UUCP (Brandon Allbery) Followup-To: net.sources Organization: North Coast Computer Resources Lines: 45 Summary: @#@#** SUMMARY **#@#@ Expires: Quoted from <5041@alice.uUCp> ["Re: set work dir aliases (Any shell with aliases)"], by sgt@alice.UucP (Steve Tell)... +--------------- | Here's a similar scheme that several people have been using on both | csh and ksh: | | csh: | alias d1 'set D1=`pwd`' | alias cd1 'cd $D1' +--------------- When I do this it usually includes a major shift in context. I use the following: ---------------- push ---------------- CSHTYPE="${2:-$CSHTYPE}" export CSHTYPE cd ${1:-.} exec ${SHELL} -i ---------------------- alias pop 'unset prompt; exit' Then, to switch contexts: [23] % push /appl/coesys COESYS [2,COESYS, 23] % pop [24] % (My .cshrc checks environment variables CSHLEVEL and CSHTYPE, so I've got a nesting level indicator and a current job. Adding an alias if CSHTYPE is non-null would be trivial.) This costs processes -- but under Berkeley you can ^Z etc. around (unfortunately, we're sys3). Actually my ``push'' command is somewhat more involved than I show... it's also on a different system. --Brandon -- In mid-winter, all of us Midwesterners would *love* a taste of California... (r-r-r-rumble) (SHA-A-KE!!!) ...but not *that* badly! decvax!cwruecmp!ncoast!allbery ncoast!allbery@Case.CSNET ncoast!tdi2!brandon (ncoast!tdi2!root for business) 6615 Center St. #A1-105, Mentor, OH 44060 Phone: +01 216 974 9210 CIS 74106,1032 MCI MAIL BALLBERY (part-time)