From 6f40a985ebeb1a8036f0f84ccf0ddf7579141604 2019-02-18 22:49:34 From: Matthias Bussonnier Date: 2019-02-18 22:49:34 Subject: [PATCH] We need to returned match text only if matches have been found. If we don't do so, it will not try the next completers. --- diff --git a/IPython/core/completer.py b/IPython/core/completer.py index 8181758..1804fce 100644 --- a/IPython/core/completer.py +++ b/IPython/core/completer.py @@ -2073,8 +2073,12 @@ class IPCompleter(Completer): # if text starts with slash if slashpos > -1: s = text[slashpos+1:] - return s, [x for x in names if x.startswith(s)] + candidates = [x for x in names if x.startswith(s)] + if candidates: + return s, [x for x in names if x.startswith(s)] + else: + return '', () # if text does not start with slash else: - return u'', [] + return u'', ()