Add persist options to allow the source command to be possible.
Default history is managed by the number of threads layers.
Add command line arguments for shell scripts.
Add custom expanvars to do variable expansion.

It expands undefined variables to emtpy strings which is consistent to
shell behaviour, while the python builtin one leaves them unchanged.

Need to take care the situtation where args or even commands expand to
empty strings.