screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: session save to disk?


From: Gerald Young
Subject: Re: session save to disk?
Date: Tue, 1 Sep 2009 16:16:08 -0500
User-agent: KMail/1.9.9

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 and 
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 
before:
http://www.nabble.com/scripting-screen-windowlist--td23169670.html

Gerald Young




reply via email to

[Prev in Thread] Current Thread [Next in Thread]