diff --git a/IPython/core/completer.py b/IPython/core/completer.py index c1d43cd..b386945 100644 --- a/IPython/core/completer.py +++ b/IPython/core/completer.py @@ -1093,6 +1093,12 @@ class IPCompleter(Completer): return [cast_unicode_py2(r) for r in res if r.lower().startswith(text_low)] except TryNext: pass + except KeyboardInterrupt: + """ + If custom completer take too long, + let keyboard interrupt abort and return nothing. + """ + break return None