Why my shell prompt/theme isn't working during recording?

See this answer: Why am I getting `command not found` at the begining of the recording session?