v2.5.0
A fresh new minor release of ABS: always be shipping! 🚢
Added a negative membership operator !in
Earlier, you could test membership with x in list
, but in order to negate that expression you had to !(x in list)
which is quite verbose.
We now added in #412 the !in
operator to make things simpler: x !in list
, it behaves just like python's not in
.
Module cache
Every time you require
d a module, you'd always get a fresh instance of it, which would cause some funny behaviors:
$ require('@runtime').name = "xxx"
$ require('@runtime').name
abs
We now (#428) cache modules as soon as they are required, so the next time you require them you will receive the same instance you've required before:
$ require('@runtime').name = "xxx"
$ require('@runtime').name
xxx
This only applies to require
and not source
, as source
is intended to be used in order to always evaluate a block of fresh code in the current environment.
Specify your own shell
In #429 we added the ability to execute commands with any shell, not just bash -c
.
You can now specify a different shell to execute system commands with through ABS_COMMAND_EXECUTOR
:
`echo \$0` # bash
env("ABS_COMMAND_EXECUTOR", "sh -c")
`echo \$0` # sh