How does reverse-i search work?

55 views
Skip to first unread message

Janghwan Kim

unread,
Dec 24, 2012, 5:06:42 AM12/24/12
to bpython
Hi list.

I've been a fan for bpython for a while, but one thing that blocked me
from using it daily is the absence of 'reverse-i-search' feature. I
personally don't get Rewind and its importance over reverse search.

I noticed some works were done on 0.11, and there's an 'undocumented'
work toward the reverse search feature. Is there some way I can use
it?

Thanks.

Mike

unread,
Dec 26, 2012, 4:22:44 PM12/26/12
to bpy...@googlegroups.com
I noticed recently that if you type a few letters from the front of the line (that you are looking for) and then the up arrow key, it will search thru history lines and show only those that start with the string you typed.

Found it by accident, as it works the same in the fish shell and I thought I was in another terminal.

e.g:

>>> pr↑

Hit up arrow a few times and it will cycle through all lines that start with "pr".

Simon de Vlieger

unread,
Dec 27, 2012, 9:59:07 AM12/27/12
to bpy...@googlegroups.com
What Mike says is indeed correct (and is a change in I believe the latest version but I am not sure exactly when I merged it in).

There is also a `reverse-i` which means if you have something on the status line and press the default shortcut (http://docs.bpython-interpreter.org/configuration.html#search control-o since control-r was taken) it will reverse through history for any line containing what is on your prompt instead of just at the beginning.

Regards,

Simon



--
You received this message because you are subscribed to the Google Groups "bpython" group.
To view this discussion on the web visit https://groups.google.com/d/msg/bpython/-/vh5mCg-bgNcJ.

To post to this group, send email to bpy...@googlegroups.com.
To unsubscribe from this group, send email to bpython+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bpython?hl=en.

Janghwan Kim

unread,
Dec 28, 2012, 2:05:17 AM12/28/12
to bpy...@googlegroups.com
Ah yes.. this seems like what I was looking for.

Though it's a bit different in ui -- I get to press the 'reverse-i-search' key first, which should be latter here
I guess it's same in function. I'll see if I can live with it.

Thank you.

Simon de Vlieger

unread,
Dec 28, 2012, 8:30:53 AM12/28/12
to bpy...@googlegroups.com
Yes, I have had plans to overhaul the way we do prompts which would allow for this for a long time. I just don't have the time to actually execute them.


To view this discussion on the web visit https://groups.google.com/d/msg/bpython/-/K1OAlzZTYIIJ.
Reply all
Reply to author
Forward
0 new messages