On Thu, Nov 05, 2015 at 06:45:45PM -0600, Dennis Williamson wrote: > red=$(tput setaf 1) > none=$(tput sgr0) > greet='\[$red\]Hello\[$none\]' > printf '%s\n' "${greet@P}" > echo -e "${greet@P}" > read -e -p "${greet@P}" > > Naively stripping the delimiters in this case would leave $redHELLO$none > where $redHello is unset or worse.
Well, obviously you wouldn't do it that way. It would be much simpler to strip the \x01 and \x02 from the output string.