On 1/7/16 9:16 AM, Andrew Kurn wrote: > Bash Version: 4.3 > Patch Level: 30 > Release Status: release > > Description: > When I put an extra space in the bind command, it fails silently > and corrupts the keyboard map. Lower-case h no longer works. > > Repeat-By: > bind Control-a: forward-search-history
OK, let's unpack this. First, this is two separate key bindings, since word splitting results in two arguments. The first one easy: it binds C-a to nothing. You specify a key binding, but no command to bind it to. The second is a little more confusing. The key name to be bound is whatever appears following the final hyphen (in this case, `history'). (The strings before the final hyphen are assumed to be modifiers, but unknown modifiers are ignored.) That string doesn't match any of the key names readline treats specially, so it assumes you want to bind the first character of the string (`h'). Since you don't provide a readline command to bind to, it gets bound to nothing. The reasons for this kind of `forgiving' key binding syntax have been lost over the last 27 years. I'll see what I can do to improve error reporting here. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/