Hello,

The manual's PROMPTING section says that PS[0124] support a long list of
escaped characters, including \[ and \].

Actually, in bash-5.3.9, PS0 does not support \[ and \]. If these are
present in its value, their corresponding raw 0x01 and 0x02 bytes do get
printed, rather than getting eliminated.

In turn, most modern terminal emulators that I'm aware of ignore these
bytes. An exception I've found is Zutty, it prints replacement symbols,
causing unexpected visual result. I'm pretty sure there are other software
and hardware terminals as well where this can cause problems.

Obviously bash doesn't need to keep track of the columns for PS0, so there
these special characters are pointless. But being pointless doesn't mean
that they shouldn't work. Could the behavior please be made consistent
across the various prompt strings, and also matching the documentation?

thanks,
Egmont

Reply via email to