zsh-workers
 help / color / mirror / code / Atom feed
From: Stephane Chazelas <stephane_chazelas@yahoo.fr>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-workers@zsh.org
Subject: Re: Regarding emulate: a thought, and refresh my memory?
Date: Wed, 7 Mar 2012 11:34:06 +0000	[thread overview]
Message-ID: <20120307113406.GF4383@yahoo.fr> (raw)
In-Reply-To: <120306223806.ZM11578@torch.brasslantern.com>

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


  reply	other threads:[~2012-03-07 11:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-04  1:25 Bart Schaefer
2012-03-06  8:27 ` PATCH " Bart Schaefer
2012-03-06 20:06 ` Peter Stephenson
2012-03-06 20:22   ` Stephane Chazelas
2012-03-07  6:38     ` Bart Schaefer
2012-03-07 11:34       ` Stephane Chazelas [this message]
2012-03-07 17:45         ` Bart Schaefer
2012-03-08  8:38           ` Stephane Chazelas
2012-03-08 15:08             ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120307113406.GF4383@yahoo.fr \
    --to=stephane_chazelas@yahoo.fr \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).