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

Re: Strange behavior of $jobstates



On 13 Nov 2018, at 16:53, dana <dana@xxxxxxx> wrote:
> The difference is the result of faf0035e53 (workers/42702). I guess anything
> that previously used information from the current (soon-to-be-parent) shell,
> like $jobstates and $sysparams[pid], would be affected that way. Seems
> consistent with how the change was described, but i'm not sure

Thank you for your answer.

Does this mean that the parameter expansion processing is changed from
the parent process before fork to the child process after fork?

As a result of this change, the operation of the parameter expansion
having a side effect also has changed. Is this intended?

Before this change (zsh 5.4.2 (x86_64-ubuntu-linux-gnu)):
% a=1
% echo ${a::=2}|cat
2
% echo $a
2

After this change (zsh 5.6.2 (x86_64-apple-darwin18.0.0)):
% a=1
% echo ${a::=2}|cat
2
% echo $a
1



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