##// END OF EJS Templates
hist -t default, omit last empty line in input_hist_raw on multiline statements, old changelog entries
vivainio -
Show More
@@ -24,13 +24,15 b" def magic_history(self, parameter_s = ''):"
24
24
25 This feature is only available if numbered prompts are in use.
25 This feature is only available if numbered prompts are in use.
26
26
27 -t: print the 'translated' history, as IPython understands it. IPython
27 -t: (default) print the 'translated' history, as IPython understands it.
28 filters your input and converts it all into valid Python source before
28 IPython filters your input and converts it all into valid Python source
29 executing it (things like magics or aliases are turned into function
29 before executing it (things like magics or aliases are turned into
30 calls, for example). With this option, you'll see the native history
30 function calls, for example). With this option, you'll see the native
31 instead of the user-entered version: '%cd /' will be seen as
31 history instead of the user-entered version: '%cd /' will be seen as
32 '_ip.magic("%cd /")' instead of '%cd /'.
32 '_ip.magic("%cd /")' instead of '%cd /'.
33
33
34 -r: print the 'raw' history, i.e. the actual commands you typed.
35
34 -g: treat the arg as a pattern to grep for in (full) history.
36 -g: treat the arg as a pattern to grep for in (full) history.
35 This includes the "shadow history" (almost all commands ever written).
37 This includes the "shadow history" (almost all commands ever written).
36 Use '%hist -g' to show full shadow history (may be very long).
38 Use '%hist -g' to show full shadow history (may be very long).
@@ -44,12 +46,15 b" def magic_history(self, parameter_s = ''):"
44 if not shell.outputcache.do_full_cache:
46 if not shell.outputcache.do_full_cache:
45 print 'This feature is only available if numbered prompts are in use.'
47 print 'This feature is only available if numbered prompts are in use.'
46 return
48 return
47 opts,args = self.parse_options(parameter_s,'gnts',mode='list')
49 opts,args = self.parse_options(parameter_s,'gntsr',mode='list')
48
50
49 if not opts.has_key('t'):
51 if opts.has_key('t'):
52 input_hist = shell.input_hist
53 elif opts.has_key('r'):
50 input_hist = shell.input_hist_raw
54 input_hist = shell.input_hist_raw
51 else:
55 else:
52 input_hist = shell.input_hist
56 input_hist = shell.input_hist
57
53
58
54 default_length = 40
59 default_length = 40
55 pattern = None
60 pattern = None
@@ -6,7 +6,7 b' Requires Python 2.3 or newer.'
6
6
7 This file contains all the classes and helper functions specific to IPython.
7 This file contains all the classes and helper functions specific to IPython.
8
8
9 $Id: iplib.py 2646 2007-08-20 16:28:48Z vivainio $
9 $Id: iplib.py 2652 2007-08-22 17:25:24Z vivainio $
10 """
10 """
11
11
12 #*****************************************************************************
12 #*****************************************************************************
@@ -2046,7 +2046,7 b' want to merge them back into the new files.""" % locals()'
2046 # only entries starting at first column go to shadow history
2046 # only entries starting at first column go to shadow history
2047 if line.lstrip() == line:
2047 if line.lstrip() == line:
2048 self.shadowhist.add(line.strip())
2048 self.shadowhist.add(line.strip())
2049 else:
2049 elif not continue_prompt:
2050 self.input_hist_raw.append('\n')
2050 self.input_hist_raw.append('\n')
2051 try:
2051 try:
2052 lineout = self.prefilter(line,continue_prompt)
2052 lineout = self.prefilter(line,continue_prompt)
@@ -1,3 +1,27 b''
1 2007-08-22 Ville Vainio <vivainio@gmail.com>
2
3 * iplib.py: no extra empty (last) line in raw hist w/ multiline
4 statements
5
6 2007-08-21 Ville Vainio <vivainio@gmail.com>
7
8 * ipmaker.py: finding ipythonrc-PROF now skips ipy_profile_PROF.
9 (for backwards compatibility)
10
11 * history.py: switch back to %hist -t from %hist -r as default.
12 At least until raw history is fixed for good.
13
14 2007-08-20 Ville Vainio <vivainio@gmail.com>
15
16 * ipapi.py, iplib.py: DebugTools accessible via _ip.dbg, to catch &
17 locate alias redeclarations etc. Also, avoid handling
18 _ip.IP.alias_table directly, prefer using _ip.defalias.
19
20
21 2007-08-15 Ville Vainio <vivainio@gmail.com>
22
23 * prefilter.py: ! is now always served first
24
1 2007-08-15 Fernando Perez <Fernando.Perez@colorado.edu>
25 2007-08-15 Fernando Perez <Fernando.Perez@colorado.edu>
2
26
3 * IPython/iplib.py (safe_execfile): fix the SystemExit
27 * IPython/iplib.py (safe_execfile): fix the SystemExit
General Comments 0
You need to be logged in to leave comments. Login now