Skip to content

Commit

Permalink
use module completion on %aimport
Browse files Browse the repository at this point in the history
  • Loading branch information
minrk committed Oct 8, 2015
1 parent eba089c commit 20b1243
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion IPython/core/completerlib.py
Expand Up @@ -223,7 +223,7 @@ def module_completion(line):
return ['import ']

# 'from xy<tab>' or 'import xy<tab>'
if nwords < 3 and (words[0] in ['import','from']) :
if nwords < 3 and (words[0] in {'%aimport', 'import', 'from'}) :
if nwords == 1:
return get_root_modules()
mod = words[1].split('.')
Expand Down
1 change: 1 addition & 0 deletions IPython/core/interactiveshell.py
Expand Up @@ -2103,6 +2103,7 @@ def init_completer(self):

self.set_hook('complete_command', module_completer, str_key = 'import')
self.set_hook('complete_command', module_completer, str_key = 'from')
self.set_hook('complete_command', module_completer, str_key = '%aimport')
self.set_hook('complete_command', magic_run_completer, str_key = '%run')
self.set_hook('complete_command', cd_completer, str_key = '%cd')
self.set_hook('complete_command', reset_completer, str_key = '%reset')
Expand Down

0 comments on commit 20b1243

Please sign in to comment.