history search quirks
Judah Jacobson
judah.jacobson at gmail.com
Mon Sep 28 10:43:20 EDT 2009
On Mon, Sep 28, 2009 at 3:33 AM, Peter Hercek <phercek at gmail.com> wrote:
> Hi,
>
> I have two comments to the history search feature in haskeline. I
> actually think they are bugs but others may think otherwise so I'm
> checking it out here.
>
> 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.
> 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?
Thanks,
-Judah
More information about the Haskeline
mailing list