Correctly handle DT_UNKNOWN.
Add support for user-defined prompts.

This change adds the 'prompt' and 'prompt_silent' callbacks which can be
bound to a  key to invoke a command prompt.