##// END OF EJS Templates
Change %history to default to 'raw' history.
Fernando Perez -
Show More
@@ -35,14 +35,14 b" def magic_history(self, parameter_s = ''):"
35 for making documentation, and in conjunction with -o, for producing
35 for making documentation, and in conjunction with -o, for producing
36 doctest-ready output.
36 doctest-ready output.
37
37
38 -t: (default) print the 'translated' history, as IPython understands it.
38 -r: (default) print the 'raw' history, i.e. the actual commands you typed.
39 IPython filters your input and converts it all into valid Python source
40 before executing it (things like magics or aliases are turned into
41 function calls, for example). With this option, you'll see the native
42 history instead of the user-entered version: '%cd /' will be seen as
43 '_ip.magic("%cd /")' instead of '%cd /'.
44
39
45 -r: print the 'raw' history, i.e. the actual commands you typed.
40 -t: print the 'translated' history, as IPython understands it. IPython
41 filters your input and converts it all into valid Python source before
42 executing it (things like magics or aliases are turned into function
43 calls, for example). With this option, you'll see the native history
44 instead of the user-entered version: '%cd /' will be seen as
45 'get_ipython().magic("%cd /")' instead of '%cd /'.
46
46
47 -g: treat the arg as a pattern to grep for in (full) history.
47 -g: treat the arg as a pattern to grep for in (full) history.
48 This includes the "shadow history" (almost all commands ever written).
48 This includes the "shadow history" (almost all commands ever written).
@@ -80,7 +80,8 b" def magic_history(self, parameter_s = ''):"
80 elif 'r' in opts:
80 elif 'r' in opts:
81 input_hist = self.input_hist_raw
81 input_hist = self.input_hist_raw
82 else:
82 else:
83 input_hist = self.input_hist
83 # Raw history is the default
84 input_hist = self.input_hist_raw
84
85
85 default_length = 40
86 default_length = 40
86 pattern = None
87 pattern = None
General Comments 0
You need to be logged in to leave comments. Login now