[IPython-dev] Tab-completion in master
Tue Aug 24 12:36:51 CDT 2010
Fernando Perez skrev 2010-08-24 19:18:
> On Tue, Aug 24, 2010 at 10:11 AM, Jörgen Stenarson
> <firstname.lastname@example.org> wrote:
>> I have a problem with tab-completion in the master branch when running
>> on windows with pyreadline. If there are both magics and regular
>> functions matching I get a list of matches but the line I started with
>> is removed, if there is only magics or regular matches it works as
>> expected. I think in 0.10 or earlier magics were only matched whith an
>> explicit % at the beginning of the line.
>> In : r
>> %reset reversed raw_input %rehashx
>> %rep reduce reload round
>> return repr range README.txt
>> raise %run ren %r
>> %reload_ext %reset_selective rmdir
>> In :
>> with longer string
>> In : res
>> %reset %reset_selective
>> In : %reset
>> Is the behaviour the same on Linux?
> Yes, I see the same:
> In : r
> %r %rundemo repr
> %rehashx raise return
> %reload_ext range reversed
> %rep raw_input rich_ipython_widget.pyc
> %reset re rm
> %reset_selective reduce rmdir
> %run reload round
> In : res
> %reset %reset_selective
> In : %reset
> but that's actually fairly similar to what 0.10 gives me:
> IPython 0.10.1 -- An enhanced Interactive Python.
> ? -> Introduction and overview of IPython's features.
> %quickref -> Quick reference.
> help -> Python's own help system.
> object? -> Details about 'object'. ?object also works, ?? prints more.
> In : r
> raise raw_input reload return rm round
> range reduce repr reversed rmdir
> In : %reset [This was re-written]
> I don't find it to be a big bother, what part of that behavior don't
> you like? The auto-prepending of '%'? I think that would be fairly
> easy to fix, though it's been around for a while without complaints...
> I'm happy to look at improving the behavior, I just want to make sure
> I understand what direction you'd like to see it improved in.
The main problem is that as it works now (at least for me) is that it
actually deletes everything I have written if there are matches both in
magics and regular. For example if I try to complete on 'color' when in
pylab mode then I get a list of 5 matches 2 magics and 3 regular but I
get to start all over again and type in color again:
In : color
colorbar colors %colors colormaps %color_info
In : <--Empty line
I find it quite annoying to have to retype things in cases like this.
I think it would be nice to get alla matches including magics but not if
the price is that I loose things I have typed.
More information about the IPython-dev