+WINDOW(1) BSD Reference Manual WINDOW(1)
+
+N\bNA\bAM\bME\bE
+ w\bwi\bin\bnd\bdo\bow\bw - window environment
+
+S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
+ w\bwi\bin\bnd\bdo\bow\bw [-\b-t\bt] [-\b-f\bf] [-\b-d\bd] [-\b-e\be _\be_\bs_\bc_\ba_\bp_\be_\b-_\bc_\bh_\ba_\br] [-\b-c\bc _\bc_\bo_\bm_\bm_\ba_\bn_\bd]
+
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+ W\bWi\bin\bnd\bdo\bow\bw implements a window environment on ASCII terminals.
+
+ A window is a rectangular portion of the physical terminal screen associ-
+ ated with a set of processes. Its size and position can be changed by
+ the user at any time. Processes communicate with their window in the
+ same way they normally interact with a terminal-through their standard
+ input, output, and diagnostic file descriptors. The window program han-
+ dles the details of redirecting input and output to and from the windows.
+ At any one time, only one window can receive input from the keyboard, but
+ all windows can simultaneously send output to the display.
+
+ When w\bwi\bin\bnd\bdo\bow\bw starts up, the commands (see long commands below) contained
+ in the file _\b._\bw_\bi_\bn_\bd_\bo_\bw_\br_\bc in the user's home directory are executed. If it
+ does not exist, two equal sized windows spanning the terminal screen are
+ created by default.
+
+ The command line options are
+
+ -\b-t\bt Turn on terse mode (see t\bte\ber\brs\bse\be command below).
+
+ -\b-f\bf Fast. Don't perform any startup action.
+
+ -\b-d\bd Ignore _\b._\bw_\bi_\bn_\bd_\bo_\bw_\br_\bc and create the two default windows instead.
+
+ -\b-e\be _\be_\bs_\bc_\ba_\bp_\be_\b-_\bc_\bh_\ba_\br
+ Set the escape character to _\be_\bs_\bc_\ba_\bp_\be_\b-_\bc_\bh_\ba_\br. _\bE_\bs_\bc_\ba_\bp_\be_\b-_\bc_\bh_\ba_\br can be a
+ single character, or in the form ^\b^X\bX where _\bX is any character,
+ meaning control-_\bX.
+
+ -\b-c\bc _\bc_\bo_\bm_\bm_\ba_\bn_\bd Execute the string _\bc_\bo_\bm_\bm_\ba_\bn_\bd as a long command (see below) be-
+ fore doing anything else.
+
+ Windows can overlap and are framed as necessary. Each window is named by
+ one of the digits ``1'' to ``9''. This one-character identifier, as well
+ as a user definable label string, are displayed with the window on the
+ top edge of its frame. A window can be designated to be in the
+ _\bf_\bo_\br_\be_\bg_\br_\bo_\bu_\bn_\bd, in which case it will always be on top of all normal, non-
+ foreground windows, and can be covered only by other foreground windows.
+ A window need not be completely within the edges of the terminal screen.
+ Thus a large window (possibly larger than the screen) may be positioned
+ to show only a portion of its full size.
+
+ Each window has a cursor and a set of control functions. Most intelli-
+ gent terminal operations such as line and character deletion and inser-
+ tion are supported. Display modes such as underlining and reverse video
+ are available if they are supported by the terminal. In addition, simi-
+ lar to terminals with multiple pages of memory, each window has a text
+ buffer which can have more lines than the window itself.
+
+ P\bPr\bro\boc\bce\bes\bss\bs E\bEn\bnv\bvi\bir\bro\bon\bnm\bme\ben\bnt\bt
+ With each newly created window, a shell program is spawned with its pro-
+ cess environment tailored to that window. Its standard input, output,
+ and diagnostic file descriptors are bound to one end of either a pseudo-
+ terminal (pty(4)) or a UNIX domain socket (socketpair(4)). If a pseudo-
+ terminal is used, then its special characters and modes (see stty(1))
+ are copied from the physical terminal. A termcap(5) entry tailored to
+ this window is created and passed as environment (environ(5)) variable
+ TERMCAP. The termcap entry contains the window's size and characteristics
+ as well as information from the physical terminal, such as the existence
+ of underline, reverse video, and other display modes, and the codes pro-
+ duced by the terminal's function keys, if any. In addition, the window
+ size attributes of the pseudo-terminal are set to reflect the size of
+ this window, and updated whenever it is changed by the user. In particu-
+ lar, the editor vi(1) uses this information to redraw its display.
+
+ O\bOp\bpe\ber\bra\bat\bti\bio\bon\bn
+ During normal execution, w\bwi\bin\bnd\bdo\bow\bw can be in one of two states: conversation
+ mode and command mode. In conversation mode, the terminal's real cursor
+ is placed at the cursor position of a particular window--called the cur-
+ rent window--and input from the keyboard is sent to the process in that
+ window. The current window is always on top of all other windows, except
+ those in foreground. In addition, it is set apart by highlighting its
+ identifier and label in reverse video.
+
+ Typing w\bwi\bin\bnd\bdo\bow\bw's escape character (normally ^\b^P\bP) in conversation mode
+ switches it into command mode. In command mode, the top line of the ter-
+ minal screen becomes the command prompt window, and w\bwi\bin\bnd\bdo\bow\bw interprets in-
+ put from the keyboard as commands to manipulate windows.
+
+ There are two types of commands: short commands are usually one or two
+ key strokes; long commands are strings either typed by the user in the
+ command window (see the ``:\b:'' command below), or read from a file (see
+ s\bso\bou\bur\brc\bce\be below).
+
+ S\bSh\bho\bor\brt\bt C\bCo\bom\bmm\bma\ban\bnd\bds\bs
+ Below, _\b# represents one of the digits ``1'' to ``9'' corresponding to the
+ windows 1 to 9. ^\b^X\bX means control-_\bX, where _\bX is any character. In par-
+ ticular, ^\b^^\b^ is control-^. _\bE_\bs_\bc_\ba_\bp_\be is the escape key, or ^\b^[\b[.
+
+ _\b# Select window _\b# as the current window and return to conversation
+ mode.
+
+ %\b%_\b# Select window _\b# but stay in command mode.
+
+ ^\b^^\b^ Select the previous window and return to conversation mode. This
+ is useful for toggling between two windows.
+
+ e\bes\bsc\bca\bap\bpe\be Return to conversation mode.
+
+ ^\b^P\bP Return to conversation mode and write ^\b^P\bP to the current window.
+ Thus, typing two ^\b^P\bP's in conversation mode sends one to the cur-
+ rent window. If the w\bwi\bin\bnd\bdo\bow\bw escape is changed to some other char-
+ acter, that character takes the place of ^\b^P\bP here.
+
+ ?\b? List a short summary of commands.
+
+ ^\b^L\bL Refresh the screen.
+
+ q\bq Exit w\bwi\bin\bnd\bdo\bow\bw. Confirmation is requested.
+
+ ^\b^Z\bZ Suspend w\bwi\bin\bnd\bdo\bow\bw.
+
+ w\bw Create a new window. The user is prompted for the positions of
+ the upper left and lower right corners of the window. The cursor
+ is placed on the screen and the keys ``h'', ``j'', ``k'', and
+ ``l'' move the cursor left, down, up, and right, respectively.
+ The keys ``H'', ``J'', ``K'', and ``L'' move the cursor to the
+ respective limits of the screen. Typing a number before the
+ movement keys repeats the movement that number of times. Return
+ enters the cursor position as the upper left corner of the win-
+ dow. The lower right corner is entered in the same manner. Dur-
+ ing this process, the placement of the new window is indicated by
+ a rectangular box drawn on the screen, corresponding to where the
+ new window will be framed. Typing escape at any point cancels
+ this command.
+
+ This window becomes the current window, and is given the first
+ available ID. The default buffer size is used (see _\bd_\be_\bf_\ba_\bu_\bl_\bt_\b__\bn_\bl_\bi_\bn_\be
+ command below).
+
+ Only fully visible windows can be created this way.
+
+ c\bc_\b# Close window _\b#. The process in the window is sent the hangup sig-
+ nal (see kill(1)). Csh(1) should handle this signal correctly
+ and cause no problems.
+
+ m\bm_\b# Move window _\b# to another location. A box in the shape of the
+ window is drawn on the screen to indicate the new position of the
+ window, and the same keys as those for the w\bw command are used to
+ position the box. The window can be moved partially off-screen.
+
+ M\bM_\b# Move window _\b# to its previous position.
+
+ s\bs_\b# Change the size of window _\b#. The user is prompted to enter the
+ new lower right corner of the window. A box is drawn to indicate
+ the new window size. The same keys used in w\bw and m\bm are used to
+ enter the position.
+
+ S\bS_\b# Change window _\b# to its previous size.
+
+ ^\b^Y\bY Scroll the current window up by one line.
+
+ ^\b^E\bE Scroll the current window down by one line.
+
+ ^\b^U\bU Scroll the current window up by half the window size.
+
+ ^\b^D\bD Scroll the current window down by half the window size.
+
+ ^\b^B\bB Scroll the current window up by the full window size.
+
+ ^\b^F\bF Scroll the current window down by the full window size.
+
+ h\bh Move the cursor of the current window left by one column.
+
+ j\bj Move the cursor of the current window down by one line.
+
+ k\bk Move the cursor of the current window up by one line.
+
+ l\bl Move the cursor of the current window right by one column.
+
+ y\by Yank. The user is prompted to enter two points within the cur-
+ rent window. Then the content of the current window between
+ those two points is saved in the yank buffer.
+
+ p\bp Put. The content of the yank buffer is written to the current
+ window as input.
+
+ ^\b^S\bS Stop output in the current window.
+
+ ^\b^Q\bQ Start output in the current window.
+
+ : Enter a line to be executed as long commands. Normal line edit-
+ ing characters (erase character, erase word, erase line) are sup-
+ ported.
+
+ L\bLo\bon\bng\bg C\bCo\bom\bmm\bma\ban\bnd\bds\bs
+ Long commands are a sequence of statements parsed much like a programming
+ language, with a syntax similar to that of C. Numeric and string expres-
+ sions and variables are supported, as well as conditional statements.
+
+ There are two data types: string and number. A string is a sequence of
+ letters or digits beginning with a letter. ``_'' and ``.'' are consid-
+ ered letters. Alternately, non-alphanumeric characters can be included
+ in strings by quoting them in ``"'' or escaping them with ``\''. In ad-
+ dition, the ``\'' sequences of C are supported, both inside and outside
+ quotes (e.g., ``\n'' is a new line, ``\r'' a carriage return). For exam-
+ ple, these are legal strings: abcde01234, "&#$^*&#", ab"$#"cd, ab\$\#cd,
+ "/usr/ucb/window".
+
+ A number is an integer value in one of three forms: a decimal number, an
+ octal number preceded by ``0'', or a hexadecimal number preceded by
+ ``0x'' or ``0X''. The natural machine integer size is used (i.e., the
+ signed integer type of the C compiler). As in C, a non-zero number rep-
+ resents a boolean true.
+
+ The character ``#'' begins a comment which terminates at the end of the
+ line.
+
+ A statement is either a conditional or an expression. Expression state-
+ ments are terminated with a new line or ``;''. To continue an expression
+ on the next line, terminate the first line with ``\''.
+
+ C\bCo\bon\bnd\bdi\bit\bti\bio\bon\bna\bal\bl S\bSt\bta\bat\bte\bem\bme\ben\bnt\bt
+ W\bWi\bin\bnd\bdo\bow\bw has a single control structure: the fully bracketed if statement
+ in the form
+
+ if <expr> then
+ <statement>
+ ...
+ elsif <expr> then
+ <statement>
+ ...
+ else
+ <statement>
+ ...
+ endif
+
+ The e\bel\bls\bse\be and e\bel\bls\bsi\bif\bf parts are optional, and the latter can be repeated any
+ number of times. <Expr> must be numeric.
+
+ E\bEx\bxp\bpr\bre\bes\bss\bsi\bio\bon\bns\bs
+ Expressions in w\bwi\bin\bnd\bdo\bow\bw are similar to those in the C language, with most C
+ operators supported on numeric operands. In addition, some are overload-
+ ed to operate on strings.
+
+ When an expression is used as a statement, its value is discarded after
+ evaluation. Therefore, only expressions with side effects (assignments
+ and function calls) are useful as statements.
+
+ Single valued (no arrays) variables are supported, of both numeric and
+ string values. Some variables are predefined. They are listed below.
+
+ The operators in order of increasing precedence:
+
+ <_\be_\bx_\bp_\br_\b1> =\b= <_\be_\bx_\bp_\br_\b2>
+ Assignment. The variable of name <_\be_\bx_\bp_\br_\b1>, which must be
+ string valued, is assigned the result of <_\be_\bx_\bp_\br_\b2>. Returns the
+ value of <_\be_\bx_\bp_\br_\b2>.
+
+ <_\be_\bx_\bp_\br_\b1> ?\b? <_\be_\bx_\bp_\br_\b2> : <_\be_\bx_\bp_\br_\b3>
+ Returns the value of <_\be_\bx_\bp_\br_\b2> if <_\be_\bx_\bp_\br_\b1> evaluates true (non-
+ zero numeric value); returns the value of <_\be_\bx_\bp_\br_\b3> otherwise.
+ Only one of <_\be_\bx_\bp_\br_\b2> and <_\be_\bx_\bp_\br_\b3> is evaluated. <_\bE_\bx_\bp_\br_\b1> must
+
+ be numeric.
+
+ <_\be_\bx_\bp_\br_\b1> |\b||\b| <_\be_\bx_\bp_\br_\b2>
+ Logical or. Numeric values only. Short circuit evaluation
+ is supported (i.e., if <_\be_\bx_\bp_\br_\b1> evaluates true, then <_\be_\bx_\bp_\br_\b2>
+ is not evaluated).
+
+ <_\be_\bx_\bp_\br_\b1> &\b&&\b& <_\be_\bx_\bp_\br_\b2>
+ Logical and with short circuit evaluation. Numeric values
+ only.
+
+ <_\be_\bx_\bp_\br_\b1> |\b| <_\be_\bx_\bp_\br_\b2>
+ Bitwise or. Numeric values only.
+
+ <_\be_\bx_\bp_\br_\b1> ^\b^ <_\be_\bx_\bp_\br_\b2>
+ Bitwise exclusive or. Numeric values only.
+
+ <_\be_\bx_\bp_\br_\b1> &\b& <_\be_\bx_\bp_\br_\b2>
+ Bitwise and. Numeric values only.
+
+ <_\be_\bx_\bp_\br_\b1> =\b==\b= <_\be_\bx_\bp_\br_\b2>, <_\be_\bx_\bp_\br_\b1> !\b!=\b= <expr2>
+ Comparison (equal and not equal, respectively). The boolean
+ result (either 1 or 0) of the comparison is returned. The
+ operands can be numeric or string valued. One string operand
+ forces the other to be converted to a string in necessary.
+
+ <_\be_\bx_\bp_\br_\b1> <\b< <_\be_\bx_\bp_\br_\b2>, <_\be_\bx_\bp_\br_\b1> >\b> <_\be_\bx_\bp_\br_\b2>, <_\be_\bx_\bp_\br_\b1> <\b<=\b= <_\be_\bx_\bp_\br_\b2>,
+ Less than, greater than, less than or equal to, greater than
+ or equal to. Both numeric and string values, with automatic
+ conversion as above.
+
+ <_\be_\bx_\bp_\br_\b1> <\b<<\b< <_\be_\bx_\bp_\br_\b2>, <_\be_\bx_\bp_\br_\b1> >\b>>\b> <_\be_\bx_\bp_\br_\b2>
+ If both operands are numbers, <_\be_\bx_\bp_\br_\b1> is bit shifted left (or
+ right) by <_\be_\bx_\bp_\br_\b2> bits. If <_\be_\bx_\bp_\br_\b1> is a string, then its
+ first (or last) <_\be_\bx_\bp_\br_\b2> characters are returns (if <_\be_\bx_\bp_\br_\b2> is
+ also a string, then its length is used in place of its val-
+ ue).
+
+ <_\be_\bx_\bp_\br_\b1> +\b+ <_\be_\bx_\bp_\br_\b2>, <_\be_\bx_\bp_\br_\b1> -\b- <_\be_\bx_\bp_\br_\b2>
+ Addition and subtraction on numbers. For ``+'', if one argu-
+ ment is a string, then the other is converted to a string,
+ and the result is the concatenation of the two strings.
+
+ <_\be_\bx_\bp_\br_\b1> *\b* <_\be_\bx_\bp_\br_\b2>, <_\be_\bx_\bp_\br_\b1> /\b/ <_\be_\bx_\bp_\br_\b2>, <_\be_\bx_\bp_\br_\b1> %\b% <_\be_\bx_\bp_\br_\b2>
+ Multiplication, division, modulo. Numbers only.
+
+ -\b-<_\be_\bx_\bp_\br>, ~\b~<_\be_\bx_\bp_\br>, !\b!<_\be_\bx_\bp_\br>, $\b$<_\be_\bx_\bp_\br>, $\b$?\b?<_\be_\bx_\bp_\br>
+ The first three are unary minus, bitwise complement and logi-
+ cal complement on numbers only. The operator, ``$'', takes
+ <_\be_\bx_\bp_\br> and returns the value of the variable of that name.
+ If <_\be_\bx_\bp_\br> is numeric with value _\bn and it appears within an
+ alias macro (see below), then it refers to the nth argument
+ of the alias invocation. ``$?'' tests for the existence of
+ the variable <_\be_\bx_\bp_\br>, and returns 1 if it exists or 0 other-
+ wise.
+
+ <_\be_\bx_\bp_\br>(<_\ba_\br_\bg_\bl_\bi_\bs_\bt>)
+ Function call. <_\bE_\bx_\bp_\br> must be a string that is the unique
+ prefix of the name of a builtin w\bwi\bin\bnd\bdo\bow\bw function or the full
+ name of a user defined alias macro. In the case of a builtin
+ function, <_\ba_\br_\bg_\bl_\bi_\bs_\bt> can be in one of two forms:
+
+ <expr1>, <expr2>, ...
+ argname1 = <expr1>, argname2 = <expr2>, ...
+
+
+ The two forms can in fact be intermixed, but the result is
+ unpredictable. Most arguments can be omitted; default values
+ will be supplied for them. The _\ba_\br_\bg_\bn_\ba_\bm_\be_\bs can be unique pre-
+ fixes of the argument names. The commas separating arguments
+ are used only to disambiguate, and can usually be omitted.
+
+ Only the first argument form is valid for user defined alias-
+ es. Aliases are defined using the a\bal\bli\bia\bas\bs builtin function
+ (see below). Arguments are accessed via a variant of the
+ variable mechanism (see ``$'' operator above).
+
+ Most functions return value, but some are used for side ef-
+ fect only and so must be used as statements. When a function
+ or an alias is used as a statement, the parentheses surround-
+ ing the argument list may be omitted. Aliases return no val-
+ ue.
+
+ B\bBu\bui\bil\blt\bti\bin\bn F\bFu\bun\bnc\bct\bti\bio\bon\bns\bs
+ The arguments are listed by name in their natural order. Optional argu-
+ ments are in square brackets `[]'. Arguments that have no names are in
+ angle brackets `<>'. An argument meant to be a boolean flag (often named
+ _\bf_\bl_\ba_\bg) can be one of _\bo_\bn, _\bo_\bf_\bf, _\by_\be_\bs, _\bn_\bo, _\bt_\br_\bu_\be, or _\bf_\ba_\bl_\bs_\be, with obvious mean-
+ ings, or it can be a numeric expression, in which case a non-zero value
+ is true.
+
+ a\bal\bli\bia\bas\bs([<_\bs_\bt_\br_\bi_\bn_\bg>], [<_\bs_\bt_\br_\bi_\bn_\bg_\b-_\bl_\bi_\bs_\bt)>]
+ If no argument is given, all currently defined alias macros
+ are listed. Otherwise, <_\bs_\bt_\br_\bi_\bn_\bg> is defined as an alias, with
+ expansion <_\bs_\bt_\br_\bi_\bn_\bg_\b-_\bl_\bi_\bs_\bt _\b>>. The previous definition of
+ <_\bs_\bt_\br_\bi_\bn_\bg>, if any, is returned. Default for <_\bs_\bt_\br_\bi_\bn_\bg_\b-_\bl_\bi_\bs_\bt> is
+ no change.
+
+ c\bcl\blo\bos\bse\be(<_\bw_\bi_\bn_\bd_\bo_\bw_\b-_\bl_\bi_\bs_\bt>)
+ Close the windows specified in <_\bw_\bi_\bn_\bd_\bo_\bw_\b-_\bl_\bi_\bs_\bt>. If
+ <_\bw_\bi_\bn_\bd_\bo_\bw_\b-_\bl_\bi_\bs_\bt> is the word _\ba_\bl_\bl, than all windows are closed.
+ No value is returned.
+
+ c\bcu\bur\brs\bso\bor\brm\bmo\bod\bde\bes\bs([_\bm_\bo_\bd_\be_\bs])
+ Set the window cursor to _\bm_\bo_\bd_\be_\bs. _\bM_\bo_\bd_\be_\bs is the bitwise or of
+ the mode bits defined as the variables _\bm_\b__\bu_\bl (underline),
+ _\bm_\b__\br_\be_\bv (reverse video), _\bm_\b__\bb_\bl_\bk (blinking), and _\bm_\b__\bg_\br_\bp (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.
+
+ d\bde\bef\bfa\bau\bul\blt\bt_\b_n\bnl\bli\bin\bne\be([_\bn_\bl_\bi_\bn_\be])
+ Set the default buffer size to _\bn_\bl_\bi_\bn_\be. 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.
+
+ d\bde\bef\bfa\bau\bul\blt\bt_\b_s\bsh\bhe\bel\bll\bl([<_\bs_\bt_\br_\bi_\bn_\bg_\b-_\bl_\bi_\bs_\bt>])
+ Set the default window shell program to <_\bs_\bt_\br_\bi_\bn_\bg_\b-_\bl_\bi_\bs_\bt>. Re-
+ turns the first string in the old shell setting. Default is
+ no change. Initially, the default shell is taken from the
+ environment variable SHELL.
+
+ d\bde\bef\bfa\bau\bul\blt\bt_\b_s\bsm\bmo\boo\bot\bth\bh([_\bf_\bl_\ba_\bg])
+ Set the default value of the _\bs_\bm_\bo_\bo_\bt_\bh argument to the command
+ w\bwi\bin\bnd\bdo\bow\bw (see below). The argument is a boolean flag (one of
+ _\bo_\bn, _\bo_\bf_\bf, _\by_\be_\bs, _\bn_\bo, _\bt_\br_\bu_\be, _\bf_\ba_\bl_\bs_\be, or a number, as described
+ above). Default is no change. The old value (as a number)
+ is returned. The initial value is 1 (true).
+
+ e\bec\bch\bho\bo([_\bw_\bi_\bn_\bd_\bo_\bw], [<_\bs_\bt_\br_\bi_\bn_\bg_\b-_\bl_\bi_\bs_\bt>])
+ Write the list of strings, <_\bs_\bt_\br_\bi_\bn_\bg_\b-_\bl_\bi_\bs_\bt>, to w\bwi\bin\bnd\bdo\bow\bw, separat-
+ ed 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 w\bwr\bri\bit\bte\be below). No value is returned. De-
+ fault is the current window.
+
+ e\bes\bsc\bca\bap\bpe\be([_\be_\bs_\bc_\ba_\bp_\be_\bc])
+ Set the escape character to _\be_\bs_\bc_\ba_\bp_\be_\b-_\bc_\bh_\ba_\br. Returns the old es-
+ cape character as a one-character string. Default is no
+ change. _\bE_\bs_\bc_\ba_\bp_\be_\bc can be a string of a single character, or in
+ the form -\b-^\b^X\bX, meaning control-_\bX.
+
+ f\bfo\bor\bre\beg\bgr\bro\bou\bun\bnd\bd([_\bw_\bi_\bn_\bd_\bo_\bw], [_\bf_\bl_\ba_\bg])
+ Move w\bwi\bin\bnd\bdo\bow\bw in or out of foreground. _\bF_\bl_\ba_\bg is a boolean val-
+ ue. The old foreground flag is returned. Default for w\bwi\bin\bnd\bdo\bow\bw
+ is the current window, default for _\bf_\bl_\ba_\bg is no change.
+
+ l\bla\bab\bbe\bel\bl([_\bw_\bi_\bn_\bd_\bo_\bw], [_\bl_\ba_\bb_\be_\bl])
+ Set the label of w\bwi\bin\bnd\bdo\bow\bw to _\bl_\ba_\bb_\be_\bl. Returns the old label as a
+ string. Default for w\bwi\bin\bnd\bdo\bow\bw is the current window, default
+ for _\bl_\ba_\bb_\be_\bl is no change. To turn off a label, set it to an
+ empty string ("").
+
+ l\bli\bis\bst\bt() No arguments. List the identifiers and labels of all win-
+ dows. No value is returned.
+
+ s\bse\bel\ble\bec\bct\bt([_\bw_\bi_\bn_\bd_\bo_\bw])
+ Make w\bwi\bin\bnd\bdo\bow\bw the current window. The previous current window
+ is returned. Default is no change.
+
+ s\bso\bou\bur\brc\bce\be(_\bf_\bi_\bl_\be_\bn_\ba_\bm_\be)
+ Read and execute the long commands in _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be. Returns -1 if
+ the file cannot be read, 0 otherwise.
+
+ t\bte\ber\brs\bse\be([flag])
+ Set terse mode to _\bf_\bl_\ba_\bg. In terse mode, the command window
+ stays hidden even in command mode, and errors are reported by
+ sounding the terminal's bell. _\bF_\bl_\ba_\bg can take on the same val-
+ ues as in _\bf_\bo_\br_\be_\bg_\br_\bo_\bu_\bn_\bd above. Returns the old terse flag. De-
+ fault is no change.
+
+ u\bun\bna\bal\bli\bia\bas\bs(_\ba_\bl_\bi_\ba_\bs)
+ Undefine _\ba_\bl_\bi_\ba_\bs. Returns -1 if _\ba_\bl_\bi_\ba_\bs does not exist, 0 other-
+ wise.
+
+ u\bun\bns\bse\bet\bt(_\bv_\ba_\br_\bi_\ba_\bb_\bl_\be)
+ Undefine _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be. Returns -1 if _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be does not exist, 0
+ otherwise.
+
+ v\bva\bar\bri\bia\bab\bbl\ble\bes\bs()
+ No arguments. List all variables. No value is returned.
+
+ w\bwi\bin\bnd\bdo\bow\bw([_\br_\bo_\bw], [_\bc_\bo_\bl_\bu_\bm_\bn], [_\bn_\br_\bo_\bw], [_\bn_\bc_\bo_\bl], [_\bn_\bl_\bi_\bn_\be], [_\bl_\ba_\bb_\be_\bl], [_\bp_\bt_\by], [_\bf_\br_\ba_\bm_\be],
+ [_\bm_\ba_\bp_\bn_\bl], [_\bk_\be_\be_\bp_\bo_\bp_\be_\bn], [_\bs_\bm_\bo_\bo_\bt_\bh], [_\bs_\bh_\be_\bl_\bl]).
+ Open a window with upper left corner at _\br_\bo_\bw, _\bc_\bo_\bl_\bu_\bm_\bn and size
+ _\bn_\br_\bo_\bw, _\bn_\bc_\bo_\bl. If _\bn_\bl_\bi_\bn_\be is specified, then that many lines are
+ allocated for the text buffer. Otherwise, the default buffer
+ size is used. Default values for _\br_\bo_\bw, _\bc_\bo_\bl_\bu_\bm_\bn, _\bn_\br_\bo_\bw, and _\bn_\bc_\bo_\bl
+ are, respectively, the upper, left-most, lower, or right-most
+ extremes of the screen. _\bL_\ba_\bb_\be_\bl is the label string. _\bF_\br_\ba_\bm_\be,
+ _\bp_\bt_\by, and _\bm_\ba_\bp_\bn_\bl are flag values interpreted in the same way as
+ the argument to _\bf_\bo_\br_\be_\bg_\br_\bo_\bu_\bn_\bd (see above); they mean, respec-
+ tively, put a frame around this window (default true), allo-
+ cate 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 _\bk_\be_\be_\bp_\bo_\bp_\be_\bn to true (de-
+ fault false) prevents this action. When _\bs_\bm_\bo_\bo_\bt_\bh is true, the
+ screen is updated more frequently (for this window) to pro-
+ duce a more terminal-like behavior. The default value of
+ _\bs_\bm_\bo_\bo_\bt_\bh is set by the _\bd_\be_\bf_\ba_\bu_\bl_\bt_\b__\bs_\bm_\bo_\bo_\bt_\bh command (see above).
+ _\bS_\bh_\be_\bl_\bl is a list of strings that will be used as the shell
+ program to place in the window (default is the program speci-
+ fied by _\bd_\be_\bf_\ba_\bu_\bl_\bt_\b__\bs_\bh_\be_\bl_\bl, see above). The created window's
+ identifier is returned as a number.
+
+ w\bwr\bri\bit\bte\be([_\bw_\bi_\bn_\bd_\bo_\bw], [<_\bs_\bt_\br_\bi_\bn_\bg_\b-_\bl_\bi_\bs_\bt>])
+ Send the list of strings, <_\bs_\bt_\br_\bi_\bn_\bg_\b-_\bl_\bi_\bs_\bt>, to w\bwi\bin\bnd\bdo\bow\bw, separated
+ by spaces but not terminated with a new line. The strings
+ are actually given to the window as input. No value is re-
+ turned. Default is the current window.
+
+ P\bPr\bre\bed\bde\bef\bfi\bin\bne\bed\bd V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs
+ These variables are for information only. Redefining them does not af-
+ fect the internal operation of w\bwi\bin\bnd\bdo\bow\bw.
+
+ _\bb_\ba_\bu_\bd The baud rate as a number between 50 and 38400.
+
+ _\bm_\bo_\bd_\be_\bs The display modes (reverse video, underline, blinking, graphics)
+ supported by the physical terminal. The value of _\bm_\bo_\bd_\be_\bs is the
+ bitwise or of some of the one bit values, _\bm_\b__\bb_\bl_\bk, _\bm_\b__\bg_\br_\bp, _\bm_\b__\br_\be_\bv, and
+ _\bm_\b__\bu_\bl (see below). These values are useful in setting the window
+ cursors' modes (see _\bc_\bu_\br_\bs_\bo_\br_\bm_\bo_\bd_\be_\bs above).
+
+ _\bm_\b__\bb_\bl_\bk The blinking mode bit.
+
+ _\bm_\b__\bg_\br_\bp The graphics mode bit (not very useful).
+
+ _\bm_\b__\br_\be_\bv The reverse video mode bit.
+
+ _\bm_\b__\bu_\bl The underline mode bit.
+
+ _\bn_\bc_\bo_\bl The number of columns on the physical screen.
+
+ _\bn_\br_\bo_\bw The number of rows on the physical screen.
+
+ _\bt_\be_\br_\bm The terminal type. The standard name, found in the second name
+ field of the terminal's TERMCAP entry, is used.
+
+E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
+ W\bWi\bin\bnd\bdo\bow\bw utilizes these environment variables: HOME, SHELL, TERM, TERMCAP,
+ WINDOW_ID.
+
+F\bFI\bIL\bLE\bES\bS
+ ~/.windowrc startup command file.
+ /dev/[pt]ty[pq]? pseudo-terminal devices.
+
+H\bHI\bIS\bST\bTO\bOR\bRY\bY
+ The w\bwi\bin\bnd\bdo\bow\bw command appeared in 4.3BSD.
+
+D\bDI\bIA\bAG\bGN\bNO\bOS\bST\bTI\bIC\bCS\bS
+ Should be self explanatory.
+
+4.3 Berkeley Distribution December 30, 1993 8