Added naive autocompletion for prompts
Accept a function returning the autocomplete terms