The arguments are listed by name in their natural order. Optional arguments are in square brackets ‘[
]' Arguments that have no names are in angle brackets ‘<>'. An argument meant to be a boolean flag (often named
flag) can be one of
on,
off,
yes,
no,
true, or
false, with obvious meanings, or it can be a numeric expression, in which case a non-zero value is true.
alias([<string>], [<string-list>])
If no argument is given, all currently defined alias macros are listed. Otherwise, <string> is defined as an alias, with expansion <string-list >>. The previous definition of <string>, if any, is returned. Default for <string-list> is no change.
close(<window-list>)
Close the windows specified in <window-list>. If <window-list> is the word all, than all windows are closed. No value is returned.
cursormodes([modes])
Set the window cursor to modes. Modes is the bitwise or of the mode bits defined as the variables m_ul (underline), m_rev (reverse video), m_blk (blinking), and m_grp (graphics, terminal dependent). Return value is the previous modes. Default is no change. For example, cursor($m_rev$m_blk) sets the window cursors to blinking reverse video.
default_nline([nline])
Set the default buffer size to nline. Initially, it is 48 lines. Returns the old default buffer size. Default is no change. Using a very large buffer can slow the program down considerably.
default_shell([<string-list>])
Set the default window shell program to <string-list>. Returns the first string in the old shell setting. Default is no change. Initially, the default shell is taken from the environment variable SHELL.
default_smooth([flag])
Set the default value of the smooth argument to the command window (see below). The argument is a boolean flag (one of on, off, yes, no, true, false, or a number, as described above). Default is no change. The old value (as a number) is returned. The initial value is 1 (true).
echo ([window], [<string-list>])
Write the list of strings, <string-list>, to window, separated by spaces and terminated with a new line. The strings are only displayed in the window, the processes in the window are not involved (see write below). No value is returned. Default is the current window.
escape([escapec])
Set the escape character to escape-char. Returns the old escape character as a one-character string. Default is no change. Escapec can be a string of a single character, or in the form -^X, meaning control-X.
foreground ([window], [flag])
Move window in or out of foreground. Flag is a boolean value. The old foreground flag is returned. Default for window is the current window, default for flag is no change.
label ([window], [label])
Set the label of window to label. Returns the old label as a string. Default for window is the current window, default for label is no change. To turn off a label, set it to an empty string ("").
list()
No arguments. List the identifiers and labels of all windows. No value is returned.
select([window])
Make window the current window. The previous current window is returned. Default is no change.
source(filename)
Read and execute the long commands in filename. Returns -1 if the file cannot be read, 0 otherwise.
terse([flag])
Set terse mode to flag. In terse mode, the command window stays hidden even in command mode, and errors are reported by sounding the terminal's bell. Flag can take on the same values as in foreground above. Returns the old terse flag. Default is no change.
unalias(alias)
Undefine alias. Returns -1 if alias does not exist, 0 otherwise.
unset(variable)
Undefine variable. Returns -1 if variable does not exist, 0 otherwise.
variables()
No arguments. List all variables. No value is returned.
window ([row], [column], [nrow], [ncol], [nline], [label], [pty], [frame], [mapnl], [keepopen], [smooth], [shell]).
Open a window with upper left corner at row, column and size nrow, ncol. If nline is specified, then that many lines are allocated for the text buffer. Otherwise, the default buffer size is used. Default values for row, column, nrow, and ncol are, respectively, the upper, left-most, lower, or right-most extremes of the screen. Label is the label string. Frame, pty, and mapnl are flag values interpreted in the same way as the argument to foreground (see above); they mean, respectively, put a frame around this window (default true), allocate pseudo-terminal for this window rather than socketpair (default true), and map new line characters in this window to carriage return and line feed (default true if socketpair is used, false otherwise). Normally, a window is automatically closed when its process exits. Setting keepopen to true (default false) prevents this action. When smooth is true, the screen is updated more frequently (for this window) to produce a more terminal-like behavior. The default value of smooth is set by the default_smooth command (see above). Shell is a list of strings that will be used as the shell program to place in the window (default is the program specified by default_shell, see above). The created window's identifier is returned as a number.
write ([window], [<string-list>])
Send the list of strings, <string-list>, to window, separated by spaces but not terminated with a new line. The strings are actually given to the window as input. No value is returned. Default is the current window.