From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3/2) with ESMTP id LAA27620 for ; Fri, 19 Jul 1996 11:16:53 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id VAA13232; Thu, 18 Jul 1996 21:11:17 -0400 (EDT) Resent-Date: Thu, 18 Jul 1996 21:11:17 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199607190012.CAA02152@hzoli.ppp.cs.elte.hu> Subject: Re: more dependencies on emulation To: A.Main@dcs.warwick.ac.uk (Zefram) Date: Fri, 19 Jul 1996 02:12:50 +0200 (MET DST) Cc: zsh-workers@math.gatech.edu In-Reply-To: <11879.199607181423@granite.dcs.warwick.ac.uk> from Zefram at "Jul 18, 96 03:23:02 pm" X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"iFWFn.0.hE3.q2kxn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1705 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Zefram wrote: > Continuing on from my FUNCTION_ARGZERO patch in article 1669, this > patch removes some direct dependencies on emulation from subst.c. > After this, the only use of emulation is in the emulate builtin itself, > and in initialisation (where it's difficult to avoid). > > There are two distinct uses of emulation addressed here. One affects > the position of filename expansion in the order of expansion; I add a > new option, SH_FILE_SUBST, to control this. This option is affected > by changing emulation mode, so the current behaviour will be unchanged > except where the new option is explicitly used. I did not want to introduce new options like FUNCTION_ARGZERO and SH_FILE_SUBST because I consider these options useful only in sh/ksh compatibility mode. Increasing the number of settable options makes it more and more difficult to write zsh functions which are independent of the current options setting. But my solition was certainly not very good. > The second use of emulation is to control whether the $foo[2] subscript > placement will work; sh and ksh don't recognise it as a subscript. > The patch makes this be controlled by the KSH_ARRAYS option, as it should > have been all along. The KSH_ARRAYS option is also changed to be set > by default when emulating sh, which was previously not essential. That's fine for me. > Both of the above optional behaviours are also documented by this patch. > Previously they were totally undocumented. I wanted to write a compatibility section in zshmisc.man but that major crash we had last weekend took all of my time. > My comments in article 1669 about the option patch in article 1275 apply > here also. Applying this patch by hand if you don't have the option > patch applied is not difficult. If anyone wants an updated copy of the > option patch, mail me. I'd like one. I wanted to include this in pre3 but again I had no time. Zoltan