[Python-bugs-list] [ python-Bugs-511655 ] Readline: unwanted filename completion
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 01 Feb 2002 03:03:54 -0800
Bugs item #511655, was opened at 2002-02-01 02:59
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=511655&group_id=5470
Category: Python Library
Group: Python 2.1.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Tjabo Kloppenburg (tapo)
Assigned to: Nobody/Anonymous (nobody)
Summary: Readline: unwanted filename completion
Initial Comment:
Hi all.
Something is broken with the completion of readline:
simon@ping-pong:~$ python
Python 2.1.1+ (#1, Jan 8 2002, 00:37:12)
[GCC 2.95.4 20011006 (Debian prerelease)] on linux2
Type "copyright", "credits" or "license" for more
information.
>>> import rlcompleter
>>> rlcompleter.readline.parse_and_bind ("tab:
complete")
>>> foo<TAB><TAB> foo.gif foo.txt foo2.gif
foobar.jpg
>>> foo.gif
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'foo' is not defined
[the "foo.gif", "foo.txt", "foo2.gif" and "foobar.jpg"
are files
in my current working directory]
It seems that readline has a fallback to filename
completion when
no matches are available. Even if I use my own
completion function:
>>> def nullcompleter (text, state):
... print "\nBuh!"
... return None
...
>>> rlcompleter.readline.set_completer(nullcompleter)
>>> foo<TAB>
Buh!
<TAB>
Buh!
foo.gif foo.txt foo2.gif foobar.jpg
foot
>>> foo
there is this filename fallback.
Is this a known Problem? Is there an evil hack to avoid
this?
Thanks,
Simon
--
Simon.Budig@unix-ag.org
http://www.home.unix-ag.org/simon/
----------------------------------------------------------------------
>Comment By: Tjabo Kloppenburg (tapo)
Date: 2002-02-01 03:03
Message:
Logged In: YES
user_id=309048
simon is a friend of mine. He tried to submit the bug
without sourceforge account, but he failed.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=511655&group_id=5470