Due to escape sequences, prompt definitions often have dyslexia-inducing complexity. For example, here is one person's definition:
ORIG=$PS1
PS1="\[${txtund}${green}\]LOCAL\[\[${reset}\]";
PS1+="\$(prompt_git \"\[${white}\] on \[${violet}\]\")";
PS1+="\[${reset}\]";
PS1+="\[ - \u\$: \]";
Even though it is broken up into separate lines, it is still pretty confusing.
Is there a tool or methodology for defining prompt components without have to sift through nested escape sequences?
(Also, what is the purpose of the "ORIG" symbol in the script in the example?)
psvar
(there's not much in the manual, you can look at the sample themes to see how it's used).