This needs two things:
- A
working_dir attribute on bash and conditional commands
- A new
cd command
{
cd: string,
cmds: command[]
}
that changes directory to the given dir and then runs the sub-commands array while in that directory. You can probably preprocess these commands away and turn them regular commands with a working-dir attribute on them