From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.mira.net.au (8.6.12/8.6.9) with SMTP id EAA24958 for ; Thu, 7 Sep 1995 04:09:47 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA02497 (5.65c/Gatech-10.0-IDA for ); Wed, 6 Sep 1995 14:11:50 -0400 Received: by math (5.x/SMI-SVR4) id AA08396; Wed, 6 Sep 1995 14:06:24 -0400 Old-Return-Path: Resent-Date: Wed, 6 Sep 1995 11:10:11 -0700 Old-Return-Path: From: schaefer@z-code.com (Barton E. Schaefer) Message-Id: <950906111012.ZM4206@zyrcon.z-code.com> Date: Wed, 6 Sep 1995 11:10:11 -0700 In-Reply-To: Toshi Isogai "Re: maintaining init files on a [t]csh influenced system" (Sep 6, 10:16am) References: Reply-To: schaefer@z-code.com X-Face: czU|*h"p8AX?4.I.yU.^s%TIMx|"-s,*'|#H^|e,QjE&!jL%<]:-.U/;khS%3a2BC5_d#)( mz=$$G0u9P&*N8cA~b[URf;lgKRif@#qEf[ltie#Gg0%6$b`e`k.Cgw:\qJx\\a7c(K7^3;gXW:e1@ J Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/69 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Sep 6, 10:16am, Toshi Isogai wrote: } Subject: Re: maintaining init files on a [t]csh influenced system } } On Wed, 6 Sep 1995, Andrew Eskilsson wrote: } } > Are there any possibilities to let zsh run the global [csh] files and } > incorporate the freshly set variables into the shell? } } I am in the same situation and what I did was setting my login } shell back to csh and at the end of my .cshrc (or .login) I added } } exec zsh Yup, I do the same thing. Proper startup of the IRIX 4 desktop is pretty heavily wired into having csh (or sh) as your login shell. My .cshrc on IRIX 4 machines actually looks (in part) like this: ### # Figure out if this login is from XDM on the console setenv TTY "`tty`" if ($?DISPLAY) then if ($DISPLAY == :0) then if (! $?CONSOLE_LOGIN) then setenv CONSOLE_LOGIN "$TTY" endif endif setenv WINTERM xterm setenv XHOST `hostname` endif if ($?CONSOLE_LOGIN) then if ("$CONSOLE_LOGIN" != "$TTY") then unsetenv CONSOLE_LOGIN endif endif # If this is not the XDM console and is interactive, run zsh if (! $?CONSOLE_LOGIN && $?prompt) then if (! $?SHLVL) then exec /usr/local/bin/zsh -l else exec /usr/local/bin/zsh endif endif ### On the original question, though -- there are two major syntactic barriers to getting zsh to parse csh script files: 1. "set" commands, because they can do any of: a. assign to multiple boolean options in a single command b. mix assignments of option variables with string assignments c. use spaces around the "=" sign in any string assignment set noclobber history = 50 nonomatch prompt="`hostname`: " 2. the "$?variable" syntax for testing whether a variable is set You can get zsh to parse just about everything else (*) by clever use of aliases and zsh functions, but I haven't figured out a workaround for either of the above. (*) "switch" statements are VERY entertaining, but possible (I think); anybody care to guess how? -- Bart Schaefer Vice President, Technology, Z-Code Software schaefer@z-code.com Division of NCD Software Corporation http://www.well.com/www/barts