Directory history not saved #634

takluyver opened this Issue Jul 29, 2011 · 4 comments


None yet

4 participants

IPython member

As reported by Jon on the mailing list.

Directory history (_dh) was saved and reloaded from disk in earlier versions. I can't actually find the code that saves it, although I think it went into the pickleshare database. We should work out what's best to do.


Wild guess: Can it have to do with
lines 41-43?

def restore_dhist(ip):
    db = ip.db
    ip.user_ns['_dh'] = db.get('dhist',[])
IPython member

It certainly would. Ah, and now I see the code that saves it - it's within the cd magic function. I'll debug it after the release - or you're welcome to go for it if you want.


This issue can be closed. See:

$ ipython --StoreMagic.autorestore=True
Python 2.7.3 (default, Apr 20 2012, 22:39:59) 
Type "copyright", "credits" or "license" for more information.

IPython -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: dhist
Directory history (kept in _dh)
0: u'/home/bfroehle'
1: u'/home/bfroehle/projects'
2: u'/home/bfroehle'
3: u'/home/bfroehle/3dg'
IPython member

There's still a slight question - do we want that to be restored by default, without having to turn on autorestore?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment