From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25173 invoked from network); 14 Feb 1997 01:42:49 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 14 Feb 1997 01:42:49 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id UAA06235; Thu, 13 Feb 1997 20:35:34 -0500 (EST) Resent-Date: Thu, 13 Feb 1997 20:24:17 -0500 (EST) Date: Thu, 13 Feb 1997 17:26:02 -0800 (PST) From: Steve Reid X-Sender: steve@bluesmoke Reply-To: Steve Reid To: Herb Maeder cc: zsh-users@math.gatech.edu Subject: Re: history sharing between ttys In-Reply-To: <199702132353.PAA00830@hotlix.artemis.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Resent-Message-ID: <"Z1pLK2.0.gR1.0xx0p"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/680 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > While we are on the subject of history... I seem to remember from using a > version of ksh way back when, that it was possible to set it up so that you > can share history between multiple ttys. So if I typed a command in one > window, I could retrieve and execute it from another window. Something like this? Last time I tried it (zsh 3.0.2) it didn't work correctly... I was told that it was because of a bug in the new history code. precmd() { fc -AI ~$USER/.history; # Append latest commands fc -R ~$USER/.history; # Read changes from all zsh's } I remember using the bash equivalent before I switched to zsh. The only problem was that it doesn't update the history until after the command exits, so commands aren't always saved in the correct order. Ideally, it should be possible to append the command to the history file immediately after the command is entered. Other running zsh's should detect the change and read it, so the user doesn't have to hit enter every time they switch ttys. Wishlist: setopt synchronize_histories