From 05e846004452ca4828d07b2cb7f12a7b21e87d24 2007-03-23 14:26:16 From: vivainio Date: 2007-03-23 14:26:16 Subject: [PATCH] fix !command /?. Closes \#52 --- diff --git a/IPython/iplib.py b/IPython/iplib.py index 1ed6172..4783ab4 100644 --- a/IPython/iplib.py +++ b/IPython/iplib.py @@ -6,7 +6,7 @@ Requires Python 2.3 or newer. This file contains all the classes and helper functions specific to IPython. -$Id: iplib.py 2172 2007-03-23 14:04:07Z vivainio $ +$Id: iplib.py 2173 2007-03-23 14:26:16Z vivainio $ """ #***************************************************************************** @@ -2120,6 +2120,15 @@ want to merge them back into the new files.""" % locals() return self.handle_normal(rewritten) #print 'pre <%s> iFun <%s> rest <%s>' % (pre,iFun,theRest) # dbg + + # Next, check if we can automatically execute this thing + + # Allow ! in multi-line statements if multi_line_specials is on: + if continue_prompt and self.rc.multi_line_specials and \ + iFun.startswith(self.ESC_SHELL): + return self.handle_shell_escape(line,continue_prompt, + pre=pre,iFun=iFun, + theRest=theRest) # First check for explicit escapes in the last/first character handler = None @@ -2135,15 +2144,6 @@ want to merge them back into the new files.""" % locals() if line.endswith('# PYTHON-MODE'): return self.handle_emacs(line,continue_prompt) - # Next, check if we can automatically execute this thing - - # Allow ! in multi-line statements if multi_line_specials is on: - if continue_prompt and self.rc.multi_line_specials and \ - iFun.startswith(self.ESC_SHELL): - return self.handle_shell_escape(line,continue_prompt, - pre=pre,iFun=iFun, - theRest=theRest) - # Let's try to find if the input line is a magic fn oinfo = None if hasattr(self,'magic_'+iFun): diff --git a/doc/ChangeLog b/doc/ChangeLog index 5086c80..ab4e1ee 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -6,6 +6,9 @@ * Extensions/ipy_gnuglobal.py added, provides %global magic for users of http://www.gnu.org/software/global + + * iplib.py: '!command /?' now doesn't invoke IPython's help system. + Closes #52. Patch by Stefan van der Walt. 2007-03-23 Fernando Perez