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

Re: bufferwords() lexes a subshell in a shortloop repeat as a string



On Mon, 18 Jan 2016 16:32:55 -0800
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> Directly at command line, gettok() returns "\210two three\216four\212".
> 
> Does the below look correct?

It's certainly plausible.

> Aside:  "emulate sh" does the equivalent of
> 
>     setopt shglob noglob nokshglob
> 
> In order to make kshglob work, one must
> 
>     setopt glob kshglob
> 
> Is that correct, or should only kshglob be needed?

Do you really mean "glob"/"noglob"?  I thought that meant what it says,
controlling all globbing.  I can't see any evidence it's related to
emulation --- it's got the "emulate" attribute, so is affected by
"emulate" without -R but it's on in all emulations.  (Not sure what use
that combination is... Oh, I see, if you turned it off yourself for some
reason, then as soon as you try to set up for any standard emulation it
goes back on again.)

I think the real question is whether kshglob should actually be on in sh
emulation nowadays.

pws



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