Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!apple!ames!pacbell!att!alberta!idacom!danny From: danny@idacom.UUCP (Danny Wilson) Newsgroups: comp.sys.apollo Subject: go to old directory == 'back' ?? Keywords: Aegis shell levels Message-ID: <678@idacom.UUCP> Date: 9 Jun 89 22:01:09 GMT Organization: IDACOM Electronics Ltd., Edmonton, Alta. Lines: 39 When using the C shell, I have a handy alias that returns you to the directory you were just in. This involves making an alias for 'cd' and 'back': alias cd set old=$cwd; chdir !* alias back set back=$old; set old=$cwd; cd $back; unset back; dirs I thought this would be a great function for the Aegis shell. I made the following shell scripts: file: wd eon if eqs ^1 "" then /com/wd # no parameters, just print where we are return endif old := ^"/com/wd" export old /com/wd ^1 file: back eon back := ^old old := ^"/com/wd" /com/wd ^back dlvar back /com/wd However, because the variable 'old' gets set at a lower shell level it is undefined within program 'back'. Has anyone got a solution for a (seemingly) easy problem like this? -- Danny Wilson IDACOM Electronics danny@idacom.uucp Edmonton, Alberta alberta!idacom!danny C A N A D A