history search quirks
Peter Hercek
phercek at gmail.com
Mon Sep 28 14:48:50 EDT 2009
Judah Jacobson wrote:
> On Mon, Sep 28, 2009 at 3:33 AM, Peter Hercek <phercek at gmail.com> wrote:
>
>> 1) When I type something in the command prompt and then call history
>> search back (reverse-i-search) then the string already typed is not used
>> as the initial value for the history search back argument. The only
>> effect the text typed before calling history search back is that it
>> preserves cursor position in the string found. For example, starting in
>> normal mode and typing ": m a ctrl-r" should have the same effect as
>> typing "ctrl-r : m a" (i.e. it should switch to the search mode with the
>> initial argument of ":ma".
>>
>
> I believe that the current behavior is the same as readline's for
> ctrl-R. Maybe the M-k or M-j commands are closer to what you want?
>
> http://trac.haskell.org/haskeline/wiki/KeyBindings
>
> None of the commands in readline have the exact behavior you described
> above, AFAIK.
>
Currently it is the same as in bash (maybe the same as readline too ...
I do not know).
And yes M-k M-j seems to be it, though I do not really know, I still use
haskeline as in ghc 6.10.3.
>> 2) When I find the wanted string in history and confirm it with enter
>> then getInputLine returns without restoring the user defined prompt
>> followed with the string found. For example, when I type "ctrl-r : m a
>> enter" the text on the terminal will be "(reverse-i-search)`:ma': :main"
>> instead of "*Main> :main". So the user defined prompt is not there. Now,
>> I know I can work around this easily using "bind: return right return"
>> in .haskeline but it looks fishy to me.
>>
>
> Yeah, this seems wrong. Can you please open a ticket at
> trac.haskell.org/haskeline?
>
Done: http://trac.haskell.org/haskeline/ticket/100
Thanks,
Peter.
More information about the Haskeline
mailing list