On Wed, Mar 1, 2023 at 1:34 PM Junio C Hamano <gitster@xxxxxxxxx> wrote: > Felipe Contreras <felipe.contreras@xxxxxxxxx> writes: > > We don't need bash to do this conversion, we can use \001 \002 > > ourselves, and then the prompt command mode is not necessary to display > > colors. > Comments from those who use colored prompt and who are familiar with > the mechansim used to implement this? As I do not use the feature > at all and haven't been following it, seeing independent support > would help the topic. At least in try1 Justin Donnelly reported success [1]. And you don't need to use the feature to check that this patch obviously works, it's easy to test. All you need to see the original problem is a short (as in width) terminal, or a long enough typed line (I type a lot of d's until surpassing the width). This prompt should easily show the original problem: PS1='\w (\e[31mfoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\e[m) > ' With the marks proposed by the patch, the problem is gone: PS1='\w (\001\e[31m\002foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\001\e[m\002) > ' Of course, in order to test, PROMPT_COMMAND shouldn't override PS1. Cheers. [1] https://lore.kernel.org/git/CAGTqyRzZ-cOp1C4f30fGFhjH1hh5U137=77pEHp_bmBzNcmTCw@xxxxxxxxxxxxxx/ -- Felipe Contreras