Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: idea for new feature (was: Re: sticky-note and zle bindings)
- X-seq: zsh-users 12492
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx, "Bastian, Waldo" <waldo.bastian@xxxxxxxxx>, "Richard Hartmann" <richih.mailinglist@xxxxxxxxx>
- Subject: Re: idea for new feature (was: Re: sticky-note and zle bindings)
- Date: Sat, 26 Jan 2008 15:31:40 -0800
- Cc: "Robert Knight" <robertknight@xxxxxxxxx>, bastian@xxxxxxx
- In-reply-to: <2d460de70801260719h594ded7ey88ca32c20bae6fdd@xxxxxxxxxxxxxx>
- In-reply-to: <2d460de70801260729q34fb7ed8o11446e63a320b2ad@xxxxxxxxxxxxxx>
- In-reply-to: <2d460de70801260741q16e4f197he2307be6e4f81c82@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> <080125095733.ZM20873@xxxxxxxxxxxxxxxxxxxxxx> <2d460de70801260719h594ded7ey88ca32c20bae6fdd@xxxxxxxxxxxxxx> <080124215848.ZM19758@xxxxxxxxxxxxxxxxxxxxxx> <2d460de70801250149t360f9938u18d458b03f464c72@xxxxxxxxxxxxxx> <1B47D24854C7BC4FA8DA28BEBB59B0BA02E64EAC@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <2d460de70801260729q34fb7ed8o11446e63a320b2ad@xxxxxxxxxxxxxx> <13ed09c00801251018l1007ac9an9c453651d5695c46@xxxxxxxxxxxxxx> <080125181227.ZM21172@xxxxxxxxxxxxxxxxxxxxxx> <2d460de70801260741q16e4f197he2307be6e4f81c82@xxxxxxxxxxxxxx>
(How many of the people Cc'd on this want to continue to be Cc'd?)
On Jan 26, 4:19pm, Richard Hartmann wrote:
} Subject: Re: idea for new feature (was: Re: sticky-note and zle bindings)
}
} 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
}
} That is only true for local shells. Remote shells should offer a way
} to resume.
There's certain state that the shell theoretically can save/restore,
independent of its display environment. There's other state that
depends on interaction with the display environment. In the case of
a remote shell, the display environment can only interact with the
shell to the extent that the remote connection protocol (e.g., ssh)
supports it, and it's highly unlikely that the local display manager
is going to be able (upon restart) to re-establish all the same
remote connections and start the correct remote applications.
The upshot of this, and of the three cases I outlined in my earlier
message, is that I think any further discussion of "remote" shells is
mostly just a diversion from the question of how the shell saves and
restores its state (and what state). If you want to talk about how
Konsole should resolve what state to store in the event that it is
using a non-local display, discuss that elsewhere.
The most we should care about on this list is how the terminal (or
whatever starts up the shell, such as sshd) communicates to the shell
that a session is to be restored.
} 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 is still not really related to whether the session is remote. You
have some conditions under which you want the shell to keep its state.
If the shell can be scripted to detect those circumstances, you get
what you want. There's no reason to give "remoteness" any special
consideration in this regard, except possibly to suggest that ssh[d]
treat shell session identity as part of X11 forwarding.
The idea that the local parent of ssh and the remote process that it
runs are somehow linked to the same session could be a useful one
even if (perhaps especially if) there is no X display involved.
} > 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?
I was thinking of a run-time communication (such as a control sequence
written to the psuedo-tty, though I don't really like that idea), but
I suppose it would be sufficient to tell the terminal in advance to
keep its fingers out of /proc/*/cwd.
On Jan 26, 4:29pm, Richard Hartmann wrote:
}
} Does anyone else have any thoughts about the relative
} merrits/disadvantages of enhancing XDG or don't people care either way
} as long as there is a 'standardized' way to do this?
I think that enough users run shells in situations completely divorced
from X desktops that it would be inappropriate to design a shell session
state mechanism with any direct dependence on, or reference to, XDG.
If XDG wants to incorporate such a shell session mechanism by reference,
that's up to them.
On Jan 26, 4:41pm, Richard Hartmann wrote:
}
} Restoring the programs that ran is a very interesting idea. I like it :)
Not "the programs that ran". The programs that *were running*; that is,
something the shell had to SIGHUP when it exited. I'd be very leery of
automatically restarting anything other than the foreground job, though,
and maybe not even that if it was a pipeline.
} If the shell is a child of ssh, there is no terminal to help the shell
} with garbage collection
ssh[d] would have to take on that role. Something has to tell the shell
*when* to garbage-collect. *What* gets collected is up to the shell.
--
Messages sorted by:
Reverse Date,
Date,
Thread,
Author