emersion / mrsh

A minimal POSIX shell
MIT License
489 stars 35 forks source link

expected a factor after + or - operator #185

Open illiliti opened 3 years ago

illiliti commented 3 years ago

sample:

echo $(( var += 1 ))

output:

dash, ash, mksh, oksh, yash, zsh(--emulate sh):

1

mrsh:

test.sh (arithmetic 1:7): expected a factor after + or - operator
illiliti commented 3 years ago

==, !=, =, *=, /=, %=, -=, <<=, >>=, &=, ^=, |=, expr?expr:expr is broken/unsupported too.

  1. https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_04
  2. https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap01.html#tag_17_01_02_01