[IPython-dev] Completer in ipython 0.6.12
Frédéric Mantegazza
mantegazza at ill.fr
Thu Mar 17 07:18:23 EST 2005
Le Mercredi 16 Mars 2005 20:38, Fernando Perez a écrit :
> > ipshell.IP.Completer.matchers.insert(0, 'proxy_matches')
> > IPython.iplib.MagicCompleter.proxy_matches = proxy_matches
>
> ipshell.IP.Completer.proxy_matches = new.instancemethod(proxy_matches,
ipshell.IP.Completer)
>
> ipshell.IP.Completer.matchers.insert(0,
ipshell.IP.Completer.proxy_matches)
>
>
> Or some minor variation thereof. Please let me know if it works, and the
> actual syntax that makes it work.
Well, it works, but not exactly in the same way as before. Now, I get all
matches, ie the standard ones, and mine. But I would like to see only
mines, ie do not call other matchers if mine returns something.
> This is something which I can then expose with a public function that
> wraps some of this boilerplate.
Yes, please ! If youd do, it may be possible to the have both behaviours: as
it is now, ie returning all matches from all matcher methods; or only
return matches from the first matcher method which returns somethings.
Then, matcher methods order is to take in account.
Thank's,
--
Frédéric
More information about the IPython-dev
mailing list