[IPython-user] Implemented: eternal "shadow history"
Fernando Perez
fperez.net@gmail....
Thu Jun 14 16:29:35 CDT 2007
On 6/14/07, Ville M. Vainio <vivainio@gmail.com> wrote:
> [Q:\ipython]|1> hist -g isto
Minor bug: if no arguments are given, it should fail gracefully instead of:
In [6]: hist -g
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/home/fperez/<ipython console> in <module>()
/home/fperez/usr/lib/python2.5/site-packages/IPython/iplib.py in
ipmagic(self, arg_s)
919 else:
920 magic_args = self.var_expand(magic_args,1)
--> 921 return fn(magic_args)
922
923 def ipalias(self,arg_s):
/home/fperez/usr/lib/python2.5/site-packages/IPython/history.py in
magic_hist(self, parameter_s)
99 def magic_hist(self, parameter_s=''):
100 """Alternate name for %history."""
--> 101 return self.magic_history(parameter_s)
102
103
/home/fperez/usr/lib/python2.5/site-packages/IPython/history.py in
magic_history(self, parameter_s)
54 init = 1
55 final = len(input_hist)
---> 56 head, pattern = parameter_s.split(None,1)
57 pattern = "*" + pattern + "*"
58 elif len(args) == 0:
ValueError: need more than 1 value to unpack
Cheers,
f
More information about the IPython-user
mailing list