Merge history from multiple sessions #44

Closed
ipython opened this Issue May 10, 2010 · 4 comments

3 participants

@ipython

Original Launchpad bug 296113: https://bugs.launchpad.net/ipython/+bug/296113
Reported by: fdo.perez (Fernando Perez).

This is a feature request from SageDays11.

Add an option for the history from multiple sessions to be merged into one, rather than the current behavior (last session to quit overwrites the file).

The idea would be to have each session periodically save its own history to a common file. Caveat: since now the history file would be shared by multiple sessions, parts of ipython that checkpoint and restore to the history file should restore from a private per-session file rather than the checkpointed one.

This should be probably off by default, since it significantly changes the history behavior and many users may not want it.

@ipython

[ LP comment 1 by: Ville M. Vainio, on 2008-11-10 21:10:21+00:00 ]

On Mon, Nov 10, 2008 at 2:22 AM, Fernando Perez fperez.net@gmail.com wrote:

Add an option for the history from multiple sessions to be merged into
one, rather than the current behavior (last session to quit overwrites
the file).

Note that shadow history already does part of this - you can't browse
it with cursor-up, but you can grep it with hist -g.

Ville M. Vainio
http://tinyurl.com/vainio

@ipython

[ LP comment 2 by: Fernando Perez, on 2008-11-11 00:37:58+00:00 ]

On Mon, Nov 10, 2008 at 1:10 PM, Ville M. Vainio vivainio@gmail.com wrote:

Note that shadow history already does part of this - you can't browse
it with cursor-up, but you can grep it with hist -g.

Shadow history isn't well documented. I opened a bug report for it:

https://bugs.launchpad.net/ipython/+bug/296560

@takluyver
IPython member

The SQLite history branch (pull request #282) resolves this - all open sessions are kept, grouped together by session and ordered by when the session was started.

@fperez
IPython member

OK, I'm closing this then as a separate issue, since we're ready to work on that pull request anyway.

@fperez fperez closed this Mar 23, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment