Split PROMPT setup into a function