Synopsis

TerminalCommander Reference

Constructors

make

Make a new instance of TerminalCommander.

make_with_title

Make a new instance of TerminalCommander with setting a custom title.

make_with_settings

Make a new instance of TerminalCommander with specifing a settings set.

Sending Commands to Terminal

do

Execute sell commands in a terminal. If required, new terminal window will be opened.After sending commands, the termial window is bring to front.

do_with

Execute sell commands in a terminal. If required, new terminal window will be opened.

wait_termination

Wait completion of commands send with do or do_with.

resolve_terminal

Check existance of the terminal opened with dodo_with.

If the therminal does not exist, TermninalComamnder finds a terminal by specified custom title or specified working directory.

Terminal Properties Setting

Settings of settings set, title, enconding, shell and working directory must be applyed to the instance,before a new terminal is opened with do, ((do_with>)).

The customization with following methods have effective only when new window is opened.

set_settings_name

Set settings set for new terminal.

set_custom_title

Set a custom title for new terminal window.

custom_title

Return custom title set wtih set_custom_title

set_working_directory

Set a prefered working directory of a terminal window when finding a terminal.

working_directory

Return the value set with set_working_directory

set_execution_string

shell command exected only when a new terminal window is opened.

execution_string

Return sell commands set with set_execution_string

set_clean_commands

set process names which can accept commands.

clean_commands

Return values set with set_clean_commands

set_shell_required

If ture is set, result of resolve_terminal is restrited to terminals of which foreground process is intractive shell (bash, zsh, tcsh and so on).

set_visible_when_launching

Set whether process of Terminal.app is made visible or not, when Termial.app is launched by do_with of which with_activation option is false.

visible_when_launching

Return whether process of Terminal.app is visible or not,when Termial.app is launched by do_with of which with_activation option is false.

Cheking Terminal Status

is_busy

Retrun the status whether the terminal remembered by the instance can accept commands or not

ttyname

Return tty device name of the terminal remembered by the instance

window_contents

Return contents displayed in the terminal remembered by the instance.

buffer_history

Return contents of scroll buffer of the terminal remembered by the instance

running_processes

Return processes in the terminal rememberd by the instance

terminal_window

Return a reference to a terminal window or a terminal tab remembered by the instance

terminal_name

Return a name of the terminal window remembered by the instance

Others

bring_to_front

Bring a terminal window remembered by the instance to front and activate an application process of Terminal.app.

Synopsis