Stop tab-completing empty lines!

Casey Rodarmor casey at rodarmor.com
Thu Jan 17 03:58:38 EST 2008


Hi everybody,

I have the following in my python startup file:

import readline, rlcompleter
readline.parse_and_bind("tab: complete")

This lets me tab complete identifiers in the interpreter beautifully, but
there's a tiny problem... If I'm sitting at the beginning of a blank line
and just want a tab, it tries to tab complete, which kind of a pain.

<BLINK>-=SIMULATED PYTHON PROMPT=-</BLINK>
>>> def mega_awesome_function(cool_stuff, **some_sweet_kwargs):
... X

(The X is where I press tab and get super annoyed)

I could just rebind the key, but i like tab ;-) Any suggestions?

Best regards,
Casey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080117/1bca3c0e/attachment.html>


More information about the Python-list mailing list