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

Re: Bug with bash emulation regarding ':'

On Feb 20, 10:59am, Peter Stephenson wrote:
} Subject: Re: Bug with bash emulation regarding ':'
} On Sun, 19 Feb 2012 15:45:15 -0800
} Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
} > In fact it may be that PREFORK_SINGLE is the only thing needed there,
} > and PREFORK_NOSHWORDSPLIT is extraneous?
} The basic behaviour is certainly given with PREFORK_SINGLE only (spbreak
} initialisation around line 1540); there's one oddity where we'll use
} SHWORDSPLIT on its own to determine the default for (@) behaviour if not
} forced on around line 1652. [...]

Hrm.  That may imply that we should do


As you later pointed out, this would only affects some strange cases
like ${(@)=...=...}, because SINGLE beats SHWORDSPLIT at line 1540; in
those cases the workaround must previously always have been to use
additional nested expansions to turn the flags on in the right places.

So I think we're safe with just SINGLE there.

} I suppose that's as good as anything.  Goodness knows how to document
} this.  I'm not sure I really understand how the ramifications of one
} option cause so much divergence internally

Well, it's because we've overloaded its meaning from the original one
of "split words on IFS" to instead mean "split words on IFS in exactly
the same circumstances and manner the POSIX shell would do so."  Plus
keeping the non-POSIXy behavior of the traditional shell when it's not
set, which is the real divergence.

} It might be worth folding this in and making 4.3.17 immediately, there's
} no real point in releasing only a partial fix.

I'll commit shortly if you haven't already.

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