##// END OF EJS Templates
%clear in now properly pads the history with empty entries
vivainio -
Show More
@@ -23,13 +23,15 b' def clear_f(self,arg):'
23 elif target == 'in':
23 elif target == 'in':
24 print "Flushing input history"
24 print "Flushing input history"
25 from IPython import iplib
25 from IPython import iplib
26 del self.input_hist[:]
26 pc = self.outputcache.prompt_count + 1
27 del self.input_hist_raw[:]
27 for n in range(1, pc):
28 for n in range(1,self.outputcache.prompt_count + 1):
29 key = '_i'+`n`
28 key = '_i'+`n`
30 try:
29 try:
31 del self.user_ns[key]
30 del self.user_ns[key]
32 except: pass
31 except: pass
32 # must be done in-place
33 self.input_hist[:] = ['\n'] * pc
34 self.input_hist_raw[:] = ['\n'] * pc
33 elif target == 'array':
35 elif target == 'array':
34 try:
36 try:
35 pylab=ip.IP.pylab
37 pylab=ip.IP.pylab
@@ -10,7 +10,8 b''
10 * ipy_completers.py: quick_completer now makes it easy to create
10 * ipy_completers.py: quick_completer now makes it easy to create
11 trivial custom completers
11 trivial custom completers
12
12
13 * clearcmd.py: shadow history compression & erasing
13 * clearcmd.py: shadow history compression & erasing, fixed input hist
14 clearing.
14
15
15 * envpersist.py, history.py: %env (sh profile only), %hist completers
16 * envpersist.py, history.py: %env (sh profile only), %hist completers
16
17
General Comments 0
You need to be logged in to leave comments. Login now