Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Augmenting a Sticky Emulation Mode



Now this is interesting:

% emulate -R sh -o noshglob -c 'foo() { print ${options[shglob]}; }'; foo
on
% emulate -R sh +o shglob -c 'foo() { print ${options[shglob]}; }'; foo
off
% emulate -R sh -o noshglob -c 'foo() { setopt; }'; foo | grep shglob; echo
$?
1
% emulate -R sh -o noshglob -c 'foo() { setopt; }'; foo
interactive
login
mailwarning
monitor
shinstdin
zle
% emulate -R sh -o shglob -c 'foo() { setopt; }'; foo
interactive
login
monitor
shinstdin
zle
% emulate -R sh +o shglob -c 'foo() { setopt; }'; foo
interactive
login
monitor
noshglob
shinstdin
zle



--
Russell Harmon


On Mon, Apr 29, 2013 at 1:47 AM, Peter Stephenson
<p.stephenson@xxxxxxxxxxx>wrote:

> On Sun, 28 Apr 2013 22:44:17 -0700
> Russell Harmon <russ@xxxxxxxxxxxxxx> wrote:
> > I'm also a little confused here.
> >
> > emulate -R sh -o noshglob -c 'foo() {; setopt; }'; foo
> > enables MAIL_WARNING while
> > emulate -R sh -o shglob -c 'foo() {; setopt; }'; foo
> > fails to enable shglob
>
> Something *is* a bit wacky here, maybe not what you're seeing...
> You need the zsh/parameter module loaded, which it probably will be for
> completion.
>
> % emulate -R sh -o noshglob -c 'foo() { print ${options[shglob]}; }'; foo
> on
> % emulate -R sh +o shglob -c 'foo() { print ${options[shglob]}; }'; foo
> off
>
> I can't think of any good reason why they should be different, though
> maybe it'll occur to me if I look deeper.
>
> pws
>


Messages sorted by: Reverse Date, Date, Thread, Author