[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: session save to disk?
Re: session save to disk?
Tue, 1 Sep 2009 18:17:49 -0500
Gerald Young <address@hidden> 2009-09-01 16:16:
> On Tuesday 01 September 2009 14:22:52 David Collins wrote:
> > Hi Gereld, thanks for sending me your scripts. I haven't had time to
> > go through it yet but it looks very complete.
> Perhaps, but my scripts got rather convoluted along the way.
> > My script is considerably less functional. As it stands it needs to be
> > executed in each shell open in the screen session. The script will
> > basically dump the pwd, a supplied title, and supplied command into a
> > screenrc file
> I too have to go window by window, executing the commands. I don't like the
> idea of commands being executed in parallel in several screen windows without
> me seeing what's going on.
> If you want to try and save the history and scrollback, you can take a look
> into the bashrc and save_screenrc script inside one of the windows of
> SESSION_demo in the archive.
> That particular sequence of commands pretty much store/restore the history
> scrollback to perfection. Its one of the nicer features I like about my
> scripts. It's like I never closed the bash window at all. =)
> > I didn't really think about my options too much when I wrote this and
> > most of the hard work could be done by just parsing the window list
> > and some screen -X magic do it all a lot easier.
> I too though of parsing the window list. But since window titles can contain
> spaces, it makes it kinda hard to parse it correctly. Perhaps with some
> regex magic.
> The real issue is capturing the window list. There was a question about this
Yes, and it wasn't the first time . In fact I had started working on a
patch to the 4.0.3 code in order to allow an option to dump the
windowlist to a file but got distracted by something else. I'll post it
if I ever finish that. It really shouldn't be difficult.
However, this is what I'd really like to get working:
I think it'd be easier to implement using something like the / key to
begin search mode which allows entering a regex for the window title
and/or number. Then let the n and N keys search forward and backward in
the list like less, vim, etc.
Another request I've heard is to allow selecting of double digit
windows. For instance, you can't currently select window 11 using
either the number keys in the windowlist mode or C-a ##, since it only
listens to the first number.
(Where I work we patch our screen to increase MAXWIN. Debian defaults
to 40 which is just not enough in some cases.)