[Patches] [ python-Patches-513235 ] prevent readline filename completion
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 12 Feb 2002 17:28:00 -0800
Patches item #513235, was opened at 2002-02-05 02:20
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=513235&group_id=5470
Category: Modules
Group: None
Status: Open
>Resolution: Accepted
Priority: 5
Submitted By: Michael Hudson (mwh)
>Assigned to: Michael Hudson (mwh)
Summary: prevent readline filename completion
Initial Comment:
This patch is from Simon Budig, and despite him being
too lazy to get an sf account, I think it should
probably go in.
--- readline.c.orig Sat Feb 2 21:44:09 2002
+++ readline.c Sat Feb 2 22:01:16 2002
@@ -346,6 +346,9 @@
lock released! */
save_tstate = PyThreadState_Swap(NULL);
PyEval_RestoreThread(tstate);
+
/* Don't use the default filename completion if we
+
have a custom completion function... */
+
rl_attempted_completion_over = 1;
r = PyObject_CallFunction(completer, "si", text, state);
if (r == NULL)
goto error;
afaict, rl_attempted_completion_over has been present
in readline since 2.0.
objections?
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2002-02-12 17:28
Message:
Logged In: YES
user_id=21627
The patch looks fine to me, please apply it. If you want
this in 2.2.1 also, I'd rather have definitive success
reports on using this patch on very old readline installations.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=513235&group_id=5470