reverse prompt commands to get correct exit code