[ale] terminal/shell transcript as a presentation, likely via VIM

Michael B. Trausch mike at trausch.us
Wed Mar 3 17:02:35 EST 2010


On 03/03/2010 03:12 PM, Richard Bronosky wrote:
> In a presentation I am doing tomorrow I need to demo using several git
> commands. I'm thinking about taking a shell transcript (captured via
> GNU screen's :hardcopy -h transcript.txt) and then opening it up in
> vim. I would then proceed to delete from the bottom up,
> command+results, step by step, until I get to the first prompt. I
> could then step back through it with the "u" key (which I will have my
> IR remote configured for). This would totally work, but If I make a
> mistake, loose the buffer, etc. I will have to recreate the undo
> history. I see this as a liability and would like a more solid
> preparation.
>
> Any ideas?
>
> I'm thinking I used to do a trick where I would save state, exit vim,
> and return later. I haven't needed that since I discovered GNU screen
> and added it to my .bashrc

You could use something like this:

http://linux.byexamples.com/archives/279/record-the-terminal-session-and-replay-later/

The "script" and "scriptreplay" commands appear to have come on my 
system by default, though they can be found in the "bsdutils" package on 
Ubuntu.

Basically, you just set your terminal size to whatever you want it to 
be, then:

script -t 2> demo.timing -a demo.session
(all your stuff here)
exit

Script starts a subshell and logs your terminal output.  I ran through a 
few things with it, including mc, and it worked pretty well; having now 
just learned about this utility, I'm going to use it when I need to log 
things to explain them later to people ("hey, that's cool, how did you 
do that?" sort of things).  Win.

	--- Mike

-- 
Michael B. Trausch                                    ☎ (404) 492-6475


More information about the Ale mailing list