BTW, thinking about how this problem would arise.... On 2022/01/20 22:43, Lawrence Velázquez wrote:
Depends what you consider to be an issue. Personally, I would be less than pleased if my whole terminal turned red just because I changed into a directory that happened to have a weird name.
Since we are talking about directory names making their way into PS1 via output of 'cd'. One might ask why you have a directory name on your system that would include such escape sequences.
For directory name used in a prompt to be a problem, you have to have created that directory or allowed someone else to create that directory on your system. Instead of worrying about effects of dirnames on PS1, one might worry about how the directory names were created in the first place, and then worry about why one would deliberately 'cd' into such a directory.