Zsh Mailing List Archive
Messages sorted by:
Re: idea for new feature (was: Re: sticky-note and zle bindings)
- X-seq: zsh-users 12480
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: "Robert Knight" <robertknight@xxxxxxxxx>, zsh-users@xxxxxxxxxx
- Subject: Re: idea for new feature (was: Re: sticky-note and zle bindings)
- Date: Fri, 25 Jan 2008 09:57:33 -0800
- In-reply-to: <2d460de70801250132n1692f74cn78d3fdc40da88b9@xxxxxxxxxxxxxx>
- 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>
(I never saw the original message from Robert Knight and it's not in the
On Jan 25, 10:32am, Richard Hartmann wrote:
} Subject: Re: idea for new feature (was: Re: sticky-note and zle bindings)
} On Jan 25, 2008 3:57 AM, Robert Knight <robertknight@xxxxxxxxx> wrote:
} > There is a misunderstanding. By "end the session", I meant ending a
} > session and removing all data associated with it. An analogy would be
} > the option not to save the tabs in a web browser when closing it.
} > Saving the session state would be the default behavior which would
} > occur when logging out of the X session or closing the shell by
} > sending SIGHUP for example.
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.
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.
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.
It also implies that the shell needs a way to tell the GUI environment
NOT to attempt, independently, to restore current directory, etc.
} One thing that would need to be decided is which sessions to delete
} first. Oldest overall, oldest upate, smallest footprint, largest
} footprint all have their respective merrits. Probably another option
Scriptable. Don't bother trying to define this in the shell itself.
} Another thing to note is that some people would probably want to keep
} the respective histories seperate, other would want to merge them on
} session 'detach', still others would probably want to merge the
} information on explicit session destruction.
} Option one could be done by hand by the route of
} the others would probably, again, need options.
See Util/reporter in the zsh source distribution for examples of how to
dump out various shell state.
Messages sorted by: