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 EAA26660 for ; Thu, 7 Sep 1995 04:36:45 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA03247 (5.65c/Gatech-10.0-IDA for ); Wed, 6 Sep 1995 14:39:15 -0400 Received: by math (5.x/SMI-SVR4) id AA08880; Wed, 6 Sep 1995 14:33:55 -0400 Old-Return-Path: Resent-Date: Wed, 6 Sep 1995 19:33:07 +0100 (BST) Old-Return-Path: From: Zefram Message-Id: <28438.199509061835@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:33:07 +0100 (BST) 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.86 Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: zefram@dcs.warwick.ac.uk Resent-Message-Id: <"H4hHr2.0.OA2.DcUJm"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/72 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu [Sorry about the earlier version of this message. I goofed.] >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. $?variable would have to be supported by zsh itself, and would conflict with the normal use of $?. I think you could define a set function that would do everything required, though. (Check if argument is an option and set it if so, check for separated = signs and join together arguments as required. It's actually not too difficult to write.) >(*) "switch" statements are VERY entertaining, but possible (I think); > anybody care to guess how? Please enlighten us. -zefram