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

Re: sh emulation POSIX non-conformances (no word splitting upon arithmetic expansion)



On Thu, Apr 22, 2021 at 8:04 AM Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
>
> I disagree. I think that the fact that $((11*11)) behaves in
> a way similar to parameter expansion makes more sense

I think it would make the most sense if number results were never
field-split, but given this ...

% integer x=121
% IFS=2 emulate sh -c 'print $[11*11]'
121
% IFS=2 emulate sh -c 'print $x'
1 1

... I think applying splitting to math expansions is probably the
right thing (to do at some point).




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