On Tue, Jan 18, 2022, at 9:13 PM, Josh Harcombe wrote: > If a folder that is being displayed as part of the PS1 prompt contains > escape sequences, bash will interpret them literally instead of escaping > them like zsh does for example. Escape sequences should be fine if directly > part of the prompt string and I'm not aware of any way for this to cause > issues other than messing with the prompt string in potentially unexpected > ways.
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. % PS1='\w \$ ' bash /tmp $ dir=$'\e[31m\e[41m\e[2J' /tmp $ mkdir "$dir" /tmp $ cd "$dir" # lol -- vq