Adding dynamic elements with return code.

Code generation can now output functions to insert dynamic elements into
the prompt. Currently the only element in this category is the return
code, which will print whenever the previous command exits with nonzero.