On 3/20/18 12:35 PM, Koichi Murase wrote: > Bash Version: 4.4 > Patch Level: 12 > Release Status: release > > > Description: > > In bash-4.3.43, bash-4.4.12, and the latest commit of the devel > branch, `bind -x' does not work for key sequences containing `\C-@'.
Thanks for the report and patch for this. Adding a new public interface is the right way to do it. I'm less certain about your second set of patches. This breaks backward compatibility -- defined as what callers have come to expect -- in several ways. Philosophically, there should not be that much difference between a function that accepts a `translated' key sequence and one that doesn't. Even if a key sequence starts in an `untranslated' state, the caller should be able to pass the translated version to rl_translate_keyseq and have the result unchanged. It's an unusual key binding that can't handle this, and I believe \C-@ is the only key sequence for which it matters. None of the arrow key sequences in common use, for example, contain it (that is your objection with _rl_term_ku, etc.). Since I believe that for the most part `raw' key sequences such as those in _rl_term_ku will pass through rl_translate_keyseq without modification, I'm going to try the changes to rl_bind_keyseq_if_unbound_in_map and the other changes in your second patch and see how it goes. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/