connection: Remove the double-decode of prompts
connection: Break out setprompt() into a function