On 14/03/12 07:40 +0100, Paul de Weerd wrote:
>On Wed, Mar 14, 2012 at 02:13:22AM -0400, Hugo Villeneuve wrote:
>| Usually, the history file is used to seed the current shell process
>| in-memory history and when the shell quits, it's overwriten.
>
>Yeah, and the part I hate about that behaviour is that with two
>concurrent sessions it means you only get the extra history from the
>last shell to exit.  That makes it pretty inconsistent and unexpected
>(which I agree the behaviour of two intermixed histories can also be,
>although I would argue that this is more "HISTORY"cally correct, as it
>lists history in chronological order).
>
>| That's how it works in:
>|
>| OpenBSD's csh, GNU's bash, etc.
>
>That doesn't mean that's 'correct' behavior.  At any rate, I love
>history, but not across sessions, so I usually don't touch HISTFILE (or
>unset it when set) to make sure I don't get a history file and when I
>am on other systems, I try to configure them to have similar behavior.
>
>Paul 'WEiRD' de Weerd
>

zsh does this pretty neatly

The relevant snippit from my .zshrc:

HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
setopt sharehistory
setopt histignoredups
setopt clobber

--
richo || Today's excuse:

PEBKAC (Problem Exists Between Keyboard And Chair)
http://blog.psych0tik.net

[demime 1.01d removed an attachment of type application/pgp-signature which had 
a name of signature.asc]

Reply via email to