On 4/21/15 3:42 PM, isabella parakiss wrote: > I noticed a problem with bind -x: readline re-prints the line if the > function is called when the cursor is not in the first line.
This is a difficult problem. The readline redisplay engine does not know where the cursor is when the command completes -- your example function doesn't produce any output, but that's not guaranteed. The `execute- command' code bound to bind -x erases the current line and places the cursor at column zero, to avoid mixing any output from the command with the line buffer's contents, so it knows it has to redraw something. It makes the conservative choice and redraws the current line completely. Chet -- ``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/