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

Re: Augmenting a Sticky Emulation Mode



I'm also seeing the same odd behavior (but not the crash) on Fedora's build
of ZSH: zsh 5.0.2 (x86_64-redhat-linux-gnu)

--
Russell Harmon


On Mon, Apr 29, 2013 at 1:51 AM, Russell Harmon <russ@xxxxxxxxxxxxxx> wrote:

> 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