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 а'?

closed as off-topic by Thomas Dickey, slm Jul 2 '16 at 19:22

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Thomas Dickey, slm
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Try with a newer version of bash/readline. It works for me (Debian's 4.3.39, backspace deletes both characters (the glyph) for e' and arrows jump over the combined glyph). Zsh (5.0.8) displays 0-width characters as <0301> in reverse video. – Stéphane Chazelas Aug 13 '15 at 8:39
  • @StéphaneChazelas Thanks for the suggestions! I already have zsh 4.3.11 installed, so I tried that out and it works just fine. If I were dealing with more than one kind of diacritic, then I'm sure I would prefer to have them actually rendered, but since I am just working with one most of the time, having the block code is just fine. I am very happy to have a working solution. I'll just switch over to zsh whenever I need to work with diacritics. Thanks!!! – reynoldsnlp Aug 13 '15 at 12:04