Chet Ramey <chet.ramey@...> writes: > > On 1/3/15 3:23 AM, Devin Homan wrote: > > There seems to be a bug in sys-libs/readline. > > > > In my .inputrc file, when I have > > *Code:* > > set horizontal-scroll-mode on > > > > > > History tab completion (that is Ctrl-r <some text> [tab]) does not flow the > > text correctly. > > So for example, if I have > > *Code:* > > eix readline > > > > in my history and do "Ctrl-r l [tab]", I get > > *Code:* > > eix read lineline > > > > . > > Pressing enter issues the "eix readline" command. > > I can't reproduce this. The potential redisplay issues aside, if you > have a file named `readline' in the current directory, or if the > completion for `eix' returns `readline' as the only alternative, the > word should expand to readlineline (or readline/line if readline is a > directory). Completion always takes place at the current cursor > position, and the reverse history search leaves the cursor before the > character found (`l'). When I replace `eix' with `echo', I see > `readlineline' displayed as output. >
You seem to have reproduced the bug. I originally posted this on a Gentoo forum thinking that this was a Gentoo specific issue. eix was a bad example being a distro specific command. But you still got the same result with 'echo readline'. The specific command does not matter, all that matters is the expansion. If I execute 'echo echo' (to put that command into the history buffer) with 'set horizontal-scroll-mode on' in .inputrc, and then do a reverse search for that command with 'Ctrl-r e' to search for a previously executed command having the letter 'e' and then tab complete, I get 'echo echoecho' with the cursor at the second 'e'. When I hit enter I get the result for the command 'echo echo'. With 'set horizontal-scroll-mode off', when I do the reverse search and hit tab, I get the correct result 'echo echo' with the cursor at the second 'e'. horizontal-scroll-mode is just supposed to prevent line wrapping when text exceeds the terminal display width, so that the screen is moved horizontally, which it does correctly. _______________________________________________ Bug-readline mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-readline
