diff --git a/IPython/Extensions/ipy_profile_sh.py b/IPython/Extensions/ipy_profile_sh.py index d7b251b..5aa12e6 100644 --- a/IPython/Extensions/ipy_profile_sh.py +++ b/IPython/Extensions/ipy_profile_sh.py @@ -54,7 +54,7 @@ def main(): # make 'd' an alias for ls -F - ip.magic('alias d ls -F --color=auto') + # ip.magic('alias d ls -F --color=auto') ip.IP.default_option('cd','-q') @@ -95,8 +95,7 @@ def main(): ip.IP.alias_table[mapper(noext)] = (0,cmd) # mglob combines 'find', recursion, exclusion... '%mglob?' to learn more - import IPython.external.mglob - IPython.external.mglob.ipython_install() + ip.load("IPython.external.mglob") extend_shell_behavior(ip) diff --git a/IPython/external/mglob.py b/IPython/external/mglob.py index b12e2de..b5d1ff5 100644 --- a/IPython/external/mglob.py +++ b/IPython/external/mglob.py @@ -190,10 +190,8 @@ def mglob_f(self, arg): print "Please specify pattern!" print globsyntax -def ipython_install(): +def init_ipython(ip): """ register %mglob for IPython """ - import IPython.ipapi - ip = IPython.ipapi.get() mglob_f.__doc__ = globsyntax ip.expose_magic("mglob",mglob_f)