From 3b7e5ccf90917c136669835b25d60f5eb2fc59bf 2019-02-04 17:05:40 From: memeplex Date: 2019-02-04 17:05:40 Subject: [PATCH] Make all_completions use new completion code This fixes a bug affecting emacs users introduced by 7.2. Fixes https://github.com/ipython/ipython/issues/11541 --- diff --git a/IPython/core/completer.py b/IPython/core/completer.py index 8987e18..716c126 100644 --- a/IPython/core/completer.py +++ b/IPython/core/completer.py @@ -1136,8 +1136,12 @@ class IPCompleter(Completer): def all_completions(self, text): """ - Wrapper around the complete method for the benefit of emacs. + Wrapper around the completions method for the benefit of emacs. """ + prefix = text[:text.rfind(".") + 1] + return map(lambda c: prefix + c.text, + self.completions(text, len(text))) + return self.complete(text)[1] def _clean_glob(self, text):