Zsh Mailing List Archive
Messages sorted by:
Re: idea for new feature (was: Re: sticky-note and zle bindings)
- X-seq: zsh-users 12472
- From: "Robert Knight" <robertknight@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: idea for new feature (was: Re: sticky-note and zle bindings)
- Date: Thu, 24 Jan 2008 18:17:09 +0000
- 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:mime-version:content-type:content-transfer-encoding:content-disposition; bh=vuksLmm/5NoLqAueIHQZDJyBQ4FQR5tJovunPOfXj7M=; b=tPievFmylExXvY2iNBUtzyPBX2QK25K+NQnw2gX3dq9m+I4OK7Kr1whRp4V0yfQdDVO0rs7CbezPzfwApwM1mKP1Hunb98Dq8KgBiClnJfDUsM1452HxC8lVKde0QxwBsZPxcUsryKqFjAzrL7kERlk96pWwQCqE17mrW9/a6eM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=AINRgDKEe1KVOq3L5kNBI3Z0ManowR04FVwwUEl6kZbajqIWf+CwemZZaxjTF8sdmeD+GLaLEEFt4OMmcUtKk4gfHW6FMqkFxYGlNIr43I0dRd2Iob5rqcrWZjk9m56e3H84o9ftfQAsYR2sc59PnnCvYETasPg4gdDJ4ic/KmI=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
> It works with gnome-terminal, with konsole it doesn't.
> But konsole must have some kind of state management because
> my wife's KDE Desktop restores all shells including the PWD.
Konsole/KDE 3 reads the shell's current working directory from /proc
and saves that information. When logging in again it opens each
window / tab with the same binary and with the working directory
recorded from /proc at shutdown. This is a pretty poor solution since
information about the shell's variables (local and environment),
history, prompt etc. are not kept.
Please don't try to do window state setup from the shell. There are a
number of reasons for this:
- gnome-terminal and Konsole both support tabs and a variety of other
window state features which cannot be controlled using escape codes
- KDE already has good built-in facilities for handling window state
between sessions, it can do a better job than zsh. This includes
cases where windows are spread across multiple displays.
- Konsole supports additional properties for each terminal such as
color scheme, key binding, scrollback settings and font setup which
only it has access to.
In summary, the shell should remember information which it knows best
(prompt,variables,history etc.) and the terminal should keep the
information which it knows best.
I think the SHELL_SESSION_COOKIE suggestion (perhaps
SHELL_SESSION_ID?) would be best from my point of view as a Konsole
developer. The value should be a unique ID of a known format so that
terminals don't end up generating pre-existing IDs by mistake.
The only problem with this approach is that there needs to be a way
for a particular session to be ended. Some options:
* End a session when an explicit command is sent to it (eg. 'Ctrl+D' or 'exit')
* Don't end sessions. Instead keep data around for the last X
sessions (where X might be 5,10 or 20).
* Define a new escape code to end a session.
Messages sorted by: