From: Andy Spiegl <zsh.Andy@spiegl.de>
To: zsh-users@sunsite.dk
Subject: Re: idea for new feature (was: Re: sticky-note and zle bindings)
Date: Thu, 17 Jan 2008 18:26:03 +0100 [thread overview]
Message-ID: <20080117172603.GA664@spiegl.de> (raw)
In-Reply-To: <080116191103.ZM12889@torch.brasslantern.com>
On 2008-01-16, 19:11, Bart Schaefer wrote:
> Of course this is what share_history and inc_append_history are in
> part intended to accomplish.
Only for the command history, though.
I was thinking about the directory stack.
> The problem is that zsh can't do it by iself. So, your X server has
> crashed and 20 shell windows went kablooie. Even if every zsh has
> faithfully been recording its state somewhere, how does each new
> xterm you launch on the retarted X desktop know which one of the 20
> saved states it should restore?
You're right - that's too complex and depends heavily on the user environment.
But zsh could start the cooperation by providing the saved data and some kind
of mechanism of reading it back in to restore the directory stack.
Having that, it will be up to the users/terminal-guys/xserver-guys to use
that data. When they know that zsh provides this they might be interested
in using it.
> The upshot is that this isn't a zsh feature -- it's a cooperative
> feature that requires effort from both the shell and whatever other
> user interface environment it's running inside.
Right, so let's start. :-)
> It's pretty simple to dump state somewhere from the precmd() function
In a separate file for each zsh instance? Using the PID? Or a counter?
Or maybe some unique identifier for each instance, say shell1, shell2, ...
That way zsh could check at startup whether there is a state-file for
its name and read it back in. The unique name should probably be in
an environment variable. Hm, then in .xsession you would start several
xterms with shells like that:
ZSHNAME="shell-1" /usr/bin/xterm -geometry 90x45+89+212 -T "Shell-1"
ZSHNAME="shell-2" /usr/bin/xterm -geometry 90x45+89+212 -T "Shell-2"
How about that?
Bye,
Andy.
--
To err is human. To really screw it up takes a computer.
next prev parent reply other threads:[~2008-01-17 17:26 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-04 10:59 Fw: Zsh - push current command on history without executing it Peter Stephenson
2008-01-04 11:04 ` Mikael Magnusson
2008-01-04 11:24 ` Casper Gripenberg
2008-01-09 18:58 ` zzapper
2008-01-09 19:15 ` Paul Lew
2008-01-13 8:00 ` Bart Schaefer
2008-01-15 22:57 ` sticky-notes script [was: Zsh - push current command on history without executing it] Jean-Rene David
2008-01-16 8:06 ` Bart Schaefer
2008-01-16 13:10 ` sticky-note and zle bindings Andy Spiegl
2008-01-16 15:59 ` Bart Schaefer
2008-01-16 17:12 ` idea for new feature (was: Re: sticky-note and zle bindings) Andy Spiegl
2008-01-17 3:11 ` Bart Schaefer
2008-01-17 17:26 ` Andy Spiegl [this message]
2008-01-18 2:12 ` Christopher Lord
2008-01-18 9:19 ` Bart Schaefer
2008-01-19 22:24 ` Andy Spiegl
2008-01-20 0:01 ` Bart Schaefer
2008-01-20 4:36 ` Matt Wozniski
2008-01-20 9:09 ` Bart Schaefer
2008-01-18 21:21 ` Richard Hartmann
2008-01-19 21:46 ` Andy Spiegl
2008-01-19 23:05 ` Bart Schaefer
2008-01-24 18:17 Robert Knight
2008-01-24 20:09 ` Richard Hartmann
2008-01-24 20:54 ` Richard Hartmann
2008-01-24 21:54 ` Robert Knight
2008-01-24 23:22 ` Richard Hartmann
[not found] ` <13ed09c00801241857n2b1613f0m2d74fd12a90135cc@mail.gmail.com>
2008-01-25 9:32 ` Richard Hartmann
2008-01-25 17:57 ` Bart Schaefer
2008-01-25 18:18 ` Robert Knight
2008-01-26 2:12 ` Bart Schaefer
2008-01-26 15:41 ` Richard Hartmann
2008-01-26 23:31 ` Bart Schaefer
2008-01-28 16:33 ` Andy Spiegl
2008-06-07 4:39 ` Robert Knight
2008-06-10 4:13 ` Benjamin R. Haskell
2008-06-11 0:02 ` Richard Hartmann
2008-06-11 0:26 ` Benjamin R. Haskell
2008-06-11 1:17 ` Richard Hartmann
2008-06-11 4:43 ` Bart Schaefer
2008-06-11 4:51 ` Benjamin R. Haskell
2008-06-11 11:47 ` Angel Olivera
2008-06-10 23:57 ` Richard Hartmann
2008-06-20 12:06 ` Richard Hartmann
2008-06-27 16:25 ` Richard Hartmann
2008-01-26 15:19 ` Richard Hartmann
2008-01-26 15:26 ` Clint Adams
2008-01-26 15:42 ` Richard Hartmann
2008-01-26 15:43 ` Richard Hartmann
2008-01-25 5:58 ` Bart Schaefer
2008-01-25 9:49 ` Richard Hartmann
2008-01-25 20:10 ` Bastian, Waldo
2008-01-26 15:29 ` Richard Hartmann
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=20080117172603.GA664@spiegl.de \
--to=zsh.andy@spiegl.de \
--cc=zsh-users@sunsite.dk \
/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).