I frequently deal with combining diacritics, especially the combining acute accent (U0301, or
\xcc\x81). I have a keyboard set up to insert this character, and that works fine in the shell.
$ echo а́ > а́ $ echo а́ | hexdump > 0000000 d0 b0 cc 81 0a > 0000005
However, the user interface is confused about how many characters are present. If I press the arrow up button and then try to edit a command that includes combining diacritics in the arguments, then I always end up deleting the wrong characters and inserting characters in the wrong place. For example, if I press backspace once, then the shell shows that I have deleted
а́, but pressing
Return shows that I have only deleted the diacritic.
$ echo > а
Pressing the up arrow again shows what was actually interpreted:
$ echo а
Is it possible to get the shell to treat combining diacritics as truly combined with the previous letter, so that a backspace will delete both? Alternatively, I would be happy for the shell to display the combining diacritic separately, something like