]> granicus.if.org Git - python/commitdiff
Simon Budig's patch (posted by me):
authorMichael W. Hudson <mwh@python.net>
Wed, 13 Feb 2002 11:58:25 +0000 (11:58 +0000)
committerMichael W. Hudson <mwh@python.net>
Wed, 13 Feb 2002 11:58:25 +0000 (11:58 +0000)
[ #513235 ] prevent readline filename completion

Modules/readline.c

index fa4fc06863dc83d20c6f174ad6e795cd17e0b3f2..9b4d9522b0ea02357a8bbf4e7919012a96cd3392 100644 (file)
@@ -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;