add a global variable while the shell is in record mode