with-terminal macro acts like a go block that exits the terminal when it completes