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 EAA25548 for ; Thu, 7 Sep 1995 04:17:11 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA02657 (5.65c/Gatech-10.0-IDA for ); Wed, 6 Sep 1995 14:19:42 -0400 Received: by math (5.x/SMI-SVR4) id AA08572; Wed, 6 Sep 1995 14:14:22 -0400 Old-Return-Path: Resent-Date: Wed, 6 Sep 1995 19:15:53 +0100 (BST) Old-Return-Path: From: Zefram Message-Id: <27562.199509061815@stone.dcs.warwick.ac.uk> Subject: Re: maintaining init files on a [t]csh influenced system To: schaefer@z-code.com Date: Wed, 6 Sep 1995 19:15:53 +0100 (BST) Cc: zsh-users@math.gatech.edu (Z Shell users mailing list) In-Reply-To: <950906111012.ZM4206@zyrcon.z-code.com> from "Barton E. Schaefer" at Sep 6, 95 11:10:11 am X-Loop: zefram@dcs.warwick.ac.uk X-Stardate: [-31]6248.80 Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-Id: <"wHUgr2.0.f52.vJUJm"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/70 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 >