zsh-workers
 help / color / mirror / code / Atom feed
From: Zefram <zefram@fysh.org>
To: schaefer@candle.brasslantern.com (Bart Schaefer)
Cc: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: emulate (Re: Prompt fun)
Date: Thu, 7 Oct 1999 18:29:43 +0100 (BST)	[thread overview]
Message-ID: <E11ZHMN-0002mM-00@crucigera.fysh.org> (raw)
In-Reply-To: <991007172015.ZM27237@candle.brasslantern.com> from Bart Schaefer at "Oct 7, 1999  5:20:15 pm"

Bart Schaefer wrote:
>Which reminds me:  I believe the original intent of "emulate" was not to
>reset _all_ options that might affect parsing (unless "emulate -R" is
>used).  I believe the intent was to reset any option that would confuse
>a ksh or sh script running in zsh.  Options like "cdablevars" and "autocd"
>were *not* handled by "emulate" because no reasonable ksh script could
>possibly depend upon those behaviors, nor could a correctly-working ksh
>script use syntax that could accidentally trigger them.

Those two will rarely make any difference.  I can imagine, though,
scripts that tentatively attempt to execute a command, and may well have
unexpected behaviour if they start cd'ing around as a result.

emulate -R is there to change the shell completely to the specified
emulation, as if it had been started under that name.  It's useful
primarily in interactive shells.  emulate without -R is supposed to
emulate (hence the name) the specified shell, as much as necessary for
scripts to be able to run unchanged (subject to the limited capabilities
of zsh to emulate other shells).  To do this, emulate without -R really
needs to set all options that affect script behaviour.

>                                             On the other hand, I'm as
>usual loathe to make "silent" changes to the option semantics.  I'd much
>rather see an additional flag to "emulate" that catches these additional
>problem cases.

So when would we use this additional flag?  It would have to be used
essentially all the time, with plain emulate left just for backward
compatibility.  I find it difficult to believe that anything actually
relies on "emulate zsh" *not* resetting EXTENDED_GLOB.

-zefram


  reply	other threads:[~1999-10-07 17:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-07  0:28 PATCH: Re: Prompt fun Bart Schaefer
1999-10-07 10:41 ` PATCH: emulate (Re: Prompt fun) Zefram
1999-10-07 14:53   ` Bart Schaefer
1999-10-07 15:11     ` Zefram
1999-10-07 15:42       ` Bart Schaefer
1999-10-07 15:50         ` Zefram
1999-10-07 17:20           ` Bart Schaefer
1999-10-07 17:29             ` Zefram [this message]
1999-10-07 18:56               ` Bart Schaefer
1999-10-08  9:58                 ` Zefram
1999-10-07 20:32               ` Reasons for not wanting EXTENDED_GLOB interactively (was Re: PATCH:...) Bruce Stephens
1999-10-08  6:15                 ` Andrej Borsenkow
1999-10-10 23:03   ` PATCH: Re: PATCH: emulate (Re: Prompt fun) Bart Schaefer
1999-10-10 23:19     ` Bart Schaefer
1999-10-11  8:20       ` Zefram
1999-10-10 23:21     ` Bart Schaefer
1999-10-11  8:17       ` Zefram

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=E11ZHMN-0002mM-00@crucigera.fysh.org \
    --to=zefram@fysh.org \
    --cc=schaefer@candle.brasslantern.com \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).