From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19119 invoked by alias); 7 Mar 2012 11:39:58 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 30326 Received: (qmail 14232 invoked from network); 7 Mar 2012 11:39:55 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_NONE, T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=no version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at yahoo.fr does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.fr; s=s1024; t=1331120047; bh=TQoUzIXlCRSCE7ZGFV1U8daSuvvfY7P7Vu4rmWp6di8=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Date:From:To:Cc:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent; b=hShgviwypesAr1nQHuikg/uMGjHCmtJRSYZsPeFuqUDt4qkbiq7VYwz/iOPBWaOhTFCwemCiaGu0u2kCpoJw4sy4w3ofcR3+FBlU/enjj3PI+ND+TOK4Ek9ldEubQsnT+qsJPtVbanCKkxM9kMsJWvKxlztEAxwrnHIJD1JeqI4= X-Yahoo-Newman-Id: 297119.50073.bm@smtp149.mail.ukl.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: tJ003VsVM1mc1GOZ3EQWH6p7U1p7Og6J0nZqbi5s8HXXdmF nPUJ3LYKdOs9dltEo62tK1yP9sDHOAdcvB1XtcNikQtGXFvv7mBY3mg5Eaao ixiGW_0OqGIrtXMLNNScHTZSLWKfh35R0yS5gLXpeMoWDrjCi4FdjuKn_h9Q InfqE8DbLa6ErtRYGG2jkzpXTex5N7IC9IQlKQ3.rXLaKDR9rz6d3hucLhoc UNRtSyPj03q4TwDRCc1mrTqpObQnrSqN0k_r.2nTyT3Zb0cG44mNiSkeJHtC qd569F9qDmBi0dWxKXI1MmU511n7hRE9xgI7hwmePZGWTHjjfRSekXQkk7SG N2j4rctihHhxe.RMGK41fMPAp_2nVfJxR1f2YFbwrG3yyrsqyenNyosuzUyd perHHD6s- X-Yahoo-SMTP: V1UR0WuswBDVD1eFhM33188Ir8ciBckz4W8ZMsAh Date: Wed, 7 Mar 2012 11:34:06 +0000 From: Stephane Chazelas To: Bart Schaefer Cc: zsh-workers@zsh.org Subject: Re: Regarding emulate: a thought, and refresh my memory? Message-ID: <20120307113406.GF4383@yahoo.fr> Mail-Followup-To: Bart Schaefer , zsh-workers@zsh.org References: <120303172521.ZM11549@torch.brasslantern.com> <20120306200652.1617879b@pws-pc.ntlworld.com> <20120306202201.GD4383@yahoo.fr> <120306223806.ZM11578@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <120306223806.ZM11578@torch.brasslantern.com> User-Agent: Mutt/1.5.21 (2010-09-15) 2012-03-06 22:38:06 -0800, Bart Schaefer: > On Mar 6, 8:22pm, Stephane Chazelas wrote: > } Subject: Re: Regarding emulate: a thought, and refresh my memory? > } > } 2012-03-06 20:06:52 +0000, Peter Stephenson: > } [...] > } > Can't see why not. I often do "emulate -L zsh; setopt extendedglob > } > cbases", it would be sensible to put that in one command. > } [...] > } > } What about special parameters like: > } > } zsh_options=(noshwordsplit noposixstrings...) > } > } emulate -L $zsh_options extendedglob > > Yes, that's the idea, just not the precise formulation. > > The first word (that doesn't begin with a hyphen) seen by "emulate" has > to be the name of the emulation mode. So, based on PWS's feedback I've > just committed 30320, which enables for example this: > > zsh_options=(noshwordsplit noposixstrings ...) > > emulate -L zsh --$^zsh_options --extendedglob > > Hmm, I should probably add a bit of doc to the description of the -c > flag pointing out that only the emulation mode is sticky, not the full > set of options one might throw in. > > Unless PWS, who knows more about how the sticky emulation works than > I do, has a clever idea about that? [...] Sorry, I realise I wrote the opposite of what I meant. What I meant was that instead of introducing a cumbersome confusing syntax, We could get rid of "emulate" (yes the contrary of what I actually wrote) and do it with setopt. Instead of "emulate zsh", do "setopt $zsh_options", and instead of "emulate -L zsh", "setopt localoptions $zsh_options", where $zsh_options is a special parameters that contains the option settings needed to /emulate/ zsh. What do you think? -- Stephane