Since Scala 2.12, -optimise flag of scalac was deprecated.
scalac -help shows:
Deprecated settings:
-optimiseCompiler flag for the optimizer in Scala 2.11 deprecated: In 2.12,-optimiseenables-opt:l:inline -opt-inline-from:**. Check-opt:helpfor using the Scala 2.12 optimizer.
It works file in bash, while error will throw if you use without asterisks quoted in zsh 5.4.2: