Zsh Mailing List Archive
Messages sorted by:
Re: idea for new feature (was: Re: sticky-note and zle bindings)
- X-seq: zsh-users 12484
- 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 18:12:27 -0800
- In-reply-to: <13ed09c00801251018l1007ac9an9c453651d5695c46@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> <13ed09c00801251018l1007ac9an9c453651d5695c46@xxxxxxxxxxxxxx>
On Jan 25, 6:18pm, Robert Knight wrote:
} > Here's a slightly different suggestion: Instead of SHELL_SESSION_ID,
} > how about SHELL_SESSION_FILE ? The terminal creates a file and puts
} > the path to it in the environment.
} That would work when the shell is running locally, but what if the
} shell is running on another system which the user is accessing via
} ssh? The terminal emulator doesn't have direct access to the remote
} file system.
Well ... I can think of three cases.
(1) The emulator itself is running remotely and displaying on the local
desktop. In this case the emulator *does* have access to the "remote"
filesystem, but the desktop manager can't restore such a window, so
there's nothing (special) for us to do.
(2) The emulator is local but the application is "ssh". This is out of
our purview; ssh could propagate the SHELL_SESSION_* environment and it
would be up to sshd to do the right thing on the remote end as part of
its X11 protocol forwarding or whatever, but whether it does is not for
us to determine.
(3) The emulator is local and the shell is local, but within that shell
the user has started up "ssh" to somewhere. Our responsibility ends
with making sure that the local shell can record its state, which may
include that it needs to start up an ssh process. Beyond that point we
are back to case (2).
What other case do you envision where the emulator can usefully be
} Since the shell is the program which is storing the data, I think it
} makes sense for it to be responsible for deciding where to put it,
} rather than the terminal.
The shell DOES determine where to store the data. The emulator (or the
desktop session) is just creating a semaphore file; think of it the same
way you'd think of .pid file in /var/run, except there's one for each
shell session. Whether the shell uses it to stash data is secondary,
and up to the shell save-state implementation; I just threw that part
out as a suggestion because it avoids the shell itself needing to have
garbage-session collection code.
Messages sorted by: