I know that it's possible to customize the prompt (as detailed in the 6.9 Controlling the Prompt section from Bash manual) and I have done it for a while, but I recently noticed some strange behavior.
Consider the two following scenarios:
Without escape sequences
PS1='\$ ' PS2='> ' PS3='#? ' PS4='+ '
With escape sequences
PS1='\[\e[1;34m\]\$\[\e[0m\] ' PS2='\[\e[1;34m\]>\[\e[0m\] ' PS3='\[\e[1;34m\]#?\[\e[0m\] ' PS4='\[\e[1;34m\]+\[\e[0m\] '
So, the problems are:
PS3is printed as is, without interpreting the escape sequences.
PS4is not even printed.
I'm pretty sure that they used to work before, but as I don't use them very often I have no clue since when they are misbehaving.
- OS: Ubuntu 16.04.4
- Shell: Bash 4.3.48(1)-release
- Terminal emulator: GNOME Terminal 3.18.3 (it also happens in virtual terminals, though)
- There hasn't been any Bash update since system was installed (2017-06-09), as far as I know.