gnachman/iTerm2 — pull request #146 by cgrushko (2013-10-28 03:07:09+00:00)
Title: Add "clear" command to iTerm's AppleScript dictionary.

Now, a script can ask a session to clear its buffer before writing a command.

This helps in the follow scenario:
An iTerm session is holding an ssh session to a remote server. By injecting commands,
a script can very quickly execute commands on the remote server (without wasting time
on opening a connection).
If that command is a build command, it is desirable for the session to only contain the results
of the last invocation.
In addition, this simplifies polling iTerm for when the command is finished: the reduced buffer size
makes this much faster and less CPU-cycle consuming.

In short, this will bring happiness to the world and we should definitely have this feature in iTerm :)