Add code blocks as a single history entry.

This has the awesome side effect of hoisting commands used inside code block declarations so that the code block can be replayed more effectively.
We shouldn’t clear history, since we’re starting a new history file.