##// END OF EJS Templates
added -g (grep) arg to %hist
vivainio -
Show More
@@ -42,9 +42,9 b" def magic_history(self, parameter_s = ''):"
42 if not shell.outputcache.do_full_cache:
42 if not shell.outputcache.do_full_cache:
43 print 'This feature is only available if numbered prompts are in use.'
43 print 'This feature is only available if numbered prompts are in use.'
44 return
44 return
45 opts,args = self.parse_options(parameter_s,'nt',mode='list')
45 opts,args = self.parse_options(parameter_s,'gnt',mode='list')
46
46
47 if not opts.has_key('n'):
47 if not opts.has_key('t'):
48 input_hist = shell.input_hist_raw
48 input_hist = shell.input_hist_raw
49 else:
49 else:
50 input_hist = shell.input_hist
50 input_hist = shell.input_hist
@@ -73,7 +73,7 b" def magic_history(self, parameter_s = ''):"
73 print_nums = not opts.has_key('n')
73 print_nums = not opts.has_key('n')
74 for in_num in range(init,final):
74 for in_num in range(init,final):
75 inline = input_hist[in_num]
75 inline = input_hist[in_num]
76 if pattern is not None and fnmatch.fnmatch(inline, pattern):
76 if pattern is not None and not fnmatch.fnmatch(inline, pattern):
77 continue
77 continue
78
78
79 multiline = int(inline.count('\n') > 1)
79 multiline = int(inline.count('\n') > 1)
General Comments 0
You need to be logged in to leave comments. Login now