From 1dcb4ef068bf996cb9c32fe139b1985183f41ecf 2006-02-10 18:07:58 From: vivainio Date: 2006-02-10 18:07:58 Subject: [PATCH] magics only complete from line start if w/o % prefix --- diff --git a/IPython/completer.py b/IPython/completer.py index 3471793..362260f 100644 --- a/IPython/completer.py +++ b/IPython/completer.py @@ -433,7 +433,9 @@ class IPCompleter(Completer): else: matches = self.global_matches(text) # this is so completion finds magics when automagic is on: - if matches == [] and not text.startswith(os.sep): + if (matches == [] and + not text.startswith(os.sep) and + not ' ' in self.lbuf): matches = self.attr_matches(self.magic_prefix+text) return matches