Zsh Mailing List Archive
Messages sorted by:
Re: idea for new feature (was: Re: sticky-note and zle bindings)
- X-seq: zsh-users 12486
- From: "Richard Hartmann" <richih.mailinglist@xxxxxxxxx>
- To: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: idea for new feature (was: Re: sticky-note and zle bindings)
- Date: Sat, 26 Jan 2008 16:19:09 +0100
- Cc: "Robert Knight" <robertknight@xxxxxxxxx>, zsh-users@xxxxxxxxxx, bastian@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=ySBWt13/POMHU3QmOsyKhQ5I2e2Ds3W5sNT3mF6vnn4=; b=LFNU1rkb3EG5s9nRspl2q7U5gx4eBEb59KW5mNmvnQiw3dSCKqoGjjTzzqpFTwJoFNShHELUrknz6FeZRexGUb2tz4aiqislNwnoZhkMsbzKtlr9pnsWRLd37OnhrjBhzQaNJAQEzQc0gF16GlkCbq63aEhvJ9rca8O/SQ1A9cs=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NXw6Q+LJ6T+0lZt+qXdratrDGjJYJeUO/iaFTsWEHlVYtbFj1U/bkqrSBlniEjLdP+e6Y6O0korvnMNpVVV+ElqqKO0RaAU981dQRYEdGrpYLWa0bpiD2rJRCDWRqwrn3DL//3jMdFxqmPPXGmHiJTkj7zcD0JBhMJbaG4f/+sw=
- In-reply-to: <080125095733.ZM20873@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <13ed09c00801241017x1cd7c454lcbf9156b6bccd9bb@xxxxxxxxxxxxxx> <2d460de70801241209u63a33fe6ufb8f396bff440dc6@xxxxxxxxxxxxxx> <2d460de70801241254v52d8a9c4he75e450f2f2bd29e@xxxxxxxxxxxxxx> <13ed09c00801241354g306f5aaay4d9e6f22c1622ec7@xxxxxxxxxxxxxx> <2d460de70801241522y47611d27k2e60c132fea1f01d@xxxxxxxxxxxxxx> <13ed09c00801241857n2b1613f0m2d74fd12a90135cc@xxxxxxxxxxxxxx> <2d460de70801250132n1692f74cn78d3fdc40da88b9@xxxxxxxxxxxxxx> <080125095733.ZM20873@xxxxxxxxxxxxxxxxxxxxxx>
On Jan 25, 2008 6:57 PM, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> Shells are slightly different beasts than other applications. If I
> explicitly exit from a shell, I'm done with whatever that shell was
> doing, and if I were to then start a new shell I wouldn't want it to
> return to the context of the the last shell I exited; the chances are
> very good that the new thing I'll be doing has nothing to do with
> the last thing.
That is only true for local shells. Remote shells should offer a way
to resume. Speaking of which, is OpenSSH able to pass environment
variables from the local to the remote session?
> OTOH if my shell *windows* in a GUI environment are disconnected, or
> the shell is killed by HUP, I probably didn't intentionally exit and I'd
> like the state restored, to the extent possible, when the GUI resumes.
> That applies whether the GUI session is exited abnormally or when I
> choose "Log Out" from a menu.
Even if there is no HUP and I cleanly exit a remote session, I would
probably want to restore session state, sometimes. A cheap way to
emulate screen, so to say.
> This implies that commands in the .zlogout or equivalent need to be
> able to determine what caused the shell to exit: builtin command,
> user-generated EOF (ctrl-D), real EOF on stdin, HUP signal, etc.
If the user can choose which set of conditions should have what effect
then yes, this would help quite a lot.
> It also implies that the shell needs a way to tell the GUI environment
> NOT to attempt, independently, to restore current directory, etc.
[XDG_]SHELL_SESSION_HANDLER or some such?
Could be 'shell', 'terminal', 'both' or a parseable list/an array?
> Scriptable. Don't bother trying to define this in the shell itself.
> Again scriptable.
The shell should probably offer hooks and options for the script to use,
but yes, that is basically what I meant.
> See Util/reporter in the zsh source distribution for examples of how to
> dump out various shell state.
Will do, thanks :)
Messages sorted by: