From: Bart Schaefer <schaefer@brasslantern.com>
To: "Zsh Hackers' List" <zsh-workers@zsh.org>
Subject: Re: emulate & xtrace
Date: Thu, 23 Feb 2012 08:45:29 -0800 [thread overview]
Message-ID: <120223084529.ZM11820@torch.brasslantern.com> (raw)
In-Reply-To: <20120223110123.18448510@pwslap01u.europe.root.pri>
On Feb 23, 11:01am, Peter Stephenson wrote:
}
} I'm thinking (post 4.3.17) of trying to make the "emulate" command leave
} on the "xtrace" option if running inside a function and the nearest
} enclosing function has "functions -t" set. Before I look at this, can
} anybody see if this is a bad idea? (Obviously "unsetopt xtrace" still
} does what you expect).
I'd almost be inclined to leave xtrace alone regardess of functions -t
but I don't see any harm in doing it the way you've described. Note
that emulate already leaves xtrace unchanged without the -R option:
torch% setopt xtrace; emulate zsh -c 'print $options[xtrace]'
+Src/zsh:9> emulate zsh -c 'print $options[xtrace]'
+(eval):1> print on
on
torch% setopt xtrace; emulate -R zsh -c 'print $options[xtrace]'
+Src/zsh:8> emulate -R zsh -c 'print $options[xtrace]'
off
There may be a few of other options that might get similar treatment,
e.g., DEBUG_BEFORE_CMD and EVAL_LINENO (which is out of alpha order in
zsh.h, by the way), HUP and RCS, possibly ERR_EXIT and ERR_RETURN.
Are there good reasons to reset those even with "emulate -R"? (It's
a bit tougher with those last two.)
next prev parent reply other threads:[~2012-02-23 16:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-23 11:01 Peter Stephenson
2012-02-23 16:45 ` Bart Schaefer [this message]
2012-02-29 15:52 ` Peter Stephenson
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=120223084529.ZM11820@torch.brasslantern.com \
--to=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).