[IPython-user] Custom command completers implemented in SVN

Stefan van der Walt stefan at sun.ac.za
Fri Nov 3 02:52:59 CST 2006


On Fri, Nov 03, 2006 at 12:02:19AM -0700, Fernando Perez wrote:
> On 11/1/06, Fernando Perez <fperez.net at gmail.com> wrote:
> 
> >Basically, ever since the code has had the ability to close the quote
> >mark on an unambiguous completion, it has worked this way.  This could
> >be improved, but it would be /new/ functionality, not fixing a
> >regression.  The analysis to do is to check whether the end of the
> >completion is a filename or a non-empty directory.  If it's a
> >filename, we can just close the quotes since nothing else can go after
> >that, but if it's a non-empty directory, it's better to not close
> >them.
> >
> >The implementation is easy.  I'm busy right now, but I might do it
> >tonight if you want it.
> 
> Done in r1872, let me know if you have any troubles.

Thanks for taking the time to implement this.  One more problem, when
autocompleting in a directory with only one subdirectory:

mkdir -p /tmp/dir/sub
fun('/tmp/di<tab>

results in

fun('/tmp/dir/sub'

Cheers
Stéfan


More information about the IPython-user mailing list