[IPython-user] Implemented: eternal "shadow history"
Ville M. Vainio
Thu Jun 14 14:37:59 CDT 2007
On 6/6/07, Ville M. Vainio <email@example.com> wrote:
> I have thought of a feature called "shadow history" that would have
> every command ever executed, but only once. I'm not yet sure how to
> refer to those history entries, Perhaps by octal-looking notation:
> %rep 24
> # fetch line 24
> %rep 024
> # fetch line 24 in shadow history
The feature is now implemented in svn.
It kinda rocks, now you'll *never* lose any commands due to IPython
crashing, having other IPython sessions overwriting your history etc.
This has been my pet peeve for a long time.
It can *only* be accessed by "%hist -g <pat>" and "%rep 035". To get
all of shadow history, type "%hist -g *".
The feature is undocumented, but you can play with it already. If you
experience slowness, we can chop the history into smaller files (it's
now in 0xff files, but we can go for 0xfff).
Here it is in action:
[Q:\ipython]|1> hist -g isto
024: python history.py
026: python ../history.py
038: hist -g isto
041: svn ci -m "implemented shadow history"
^shadow history ends, fetch by %rep <number> (must start with 0)
=== start of normal history ===
1: hist -g isto
[Q:\ipython]|2> rep 041
[Q:\ipython]|3> svn ci -m "implemented shadow history"
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'
More information about the IPython-user