zsh-users
 help / color / mirror / code / Atom feed
From: Steve Reid <steve@edmweb.com>
To: Herb Maeder <maeder@corp.webtv.net>
Cc: zsh-users@math.gatech.edu
Subject: Re: history sharing between ttys
Date: Thu, 13 Feb 1997 17:26:02 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.3.95q.970213165531.4182A-100000@bluesmoke> (raw)
In-Reply-To: <199702132353.PAA00830@hotlix.artemis.com>

> 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


  reply	other threads:[~1997-02-14  1:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-02-13 23:53 Herb Maeder
1997-02-14  1:26 ` Steve Reid [this message]
1997-02-14  8:07   ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.3.95q.970213165531.4182A-100000@bluesmoke \
    --to=steve@edmweb.com \
    --cc=maeder@corp.webtv.net \
    --cc=zsh-users@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).