summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMichael W. Hudson <mwh@python.net>2002-02-13 11:58:25 (GMT)
committerMichael W. Hudson <mwh@python.net>2002-02-13 11:58:25 (GMT)
commit0c1ceaf66ddb8cdaecd9d43f4f47abb8151a1ddb (patch)
tree2ca5f8b8e311c1fc2e157626c36a876911d0be99 /Modules
parent8fef47be5f42c6b8b479e929cd57198a2572a9df (diff)
downloadcpython-0c1ceaf66ddb8cdaecd9d43f4f47abb8151a1ddb.zip
cpython-0c1ceaf66ddb8cdaecd9d43f4f47abb8151a1ddb.tar.gz
cpython-0c1ceaf66ddb8cdaecd9d43f4f47abb8151a1ddb.tar.bz2
Simon Budig's patch (posted by me):
[ #513235 ] prevent readline filename completion
Diffstat (limited to 'Modules')
-rw-r--r--Modules/readline.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/readline.c b/Modules/readline.c
index fa4fc06..9b4d952 100644
--- a/Modules/readline.c
+++ b/Modules/readline.c
@@ -460,6 +460,9 @@ on_completion(char *text, int state)
lock released! */
save_tstate = PyThreadState_Swap(NULL);
PyEval_RestoreThread(completer_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;