Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0c1ceaf

Browse files
author
Michael W. Hudson
committed
Simon Budig's patch (posted by me):
[ #513235 ] prevent readline filename completion
1 parent 8fef47b commit 0c1ceaf

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Modules/readline.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,9 @@ on_completion(char *text, int state)
460460
lock released! */
461461
save_tstate = PyThreadState_Swap(NULL);
462462
PyEval_RestoreThread(completer_tstate);
463+
/* Don't use the default filename completion if we
464+
* have a custom completion function... */
465+
rl_attempted_completion_over = 1;
463466
r = PyObject_CallFunction(completer, "si", text, state);
464467
if (r == NULL)
465468
goto error;

0 commit comments

Comments
 (0)