From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25708 invoked from network); 7 Oct 1999 14:54:19 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 Oct 1999 14:54:19 -0000 Received: (qmail 16719 invoked by alias); 7 Oct 1999 14:54:13 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8162 Received: (qmail 16696 invoked from network); 7 Oct 1999 14:54:11 -0000 From: "Bart Schaefer" Message-Id: <991007145347.ZM27050@candle.brasslantern.com> Date: Thu, 7 Oct 1999 14:53:47 +0000 In-Reply-To: Comments: In reply to Zefram "PATCH: emulate (Re: Prompt fun)" (Oct 7, 11:41am) References: X-Mailer: Z-Mail (5.0.0 30July97) To: Zefram Subject: Re: PATCH: emulate (Re: Prompt fun) Cc: zsh-workers@sunsite.auc.dk MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Oct 7, 11:41am, Zefram wrote: } Subject: PATCH: emulate (Re: Prompt fun) } } Bart Schaefer wrote: } > emulate -L zsh } >+ setopt extendedglob } } This shouldn't be causing confusion. emulate is supposed to set all } (and only) the options that can affect the behaviour of a script. } The patch below fixes this. I disagree with a number of these changes, particularly promptbang, promptpercent, and promptsubst. Most scripts do not alter the values of PS[1234], and resetting the prompt-expansion options will cause the user's settings to display as garbage in conjunction with either use of "select" loops or (as of 3.1.6) "setopt xtrace"/"set -x". I further think it's unwise to have emulate reset either errexit or "exec" -- though I don't see how it could possibly make any difference to the latter, as emulate itself won't be executed if exec isn't set. I don't have any really strong feelings about the others, though there may be room for some debate as to how many of them are "likely to cause portability problems in scripts and functions." Certainly I agree with some of the changes, e.g. the history options ought *not* to be reset. } The patch quoted above is still necessary; EXTENDED_GLOB is unset } by default even in zsh mode. Would changing that break any scripts? Yes, it would break some of my scripts. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com