[BACK]Return to window.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / window

Diff for /src/usr.bin/window/Attic/window.1 between version 1.8 and 1.9

version 1.8, 2000/03/06 03:17:41 version 1.9, 2000/03/14 14:58:27
Line 57 
Line 57 
 terminals.  terminals.
 .Pp  .Pp
 A window is a rectangular portion of the physical terminal  A window is a rectangular portion of the physical terminal
 screen associated with a set of processes.  Its size and  screen associated with a set of processes.
 position can be changed by the user at any time.  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  communicate with their window in the same way they normally
 interact with a terminal - through their standard input, output,  interact with a terminal - through their standard input, output,
 and diagnostic file descriptors.  The window program handles the  and diagnostic file descriptors.
   The window program handles the
 details of redirecting input and output to and from the  details of redirecting input and output to and from the
 windows.  At any one time, only one window can receive  windows.
   At any one time, only one window can receive
 input from the keyboard, but all windows can simultaneously send output  input from the keyboard, but all windows can simultaneously send output
 to the display.  to the display.
 .Pp  .Pp
Line 73 
Line 77 
 contained in the file  contained in the file
 .Pa .windowrc  .Pa .windowrc
 in the user's home directory are  in the user's home directory are
 executed.  If it does not exist, two equal sized windows spanning  executed.
   If it does not exist, two equal sized windows spanning
 the terminal screen are created by default.  the terminal screen are created by default.
 .Pp  .Pp
 The command line options are:  The options are as follows:
 .Bl -tag -width Fl  .Bl -tag -width Fl
 .It Fl t  .It Fl t
 Turn on terse mode (see  Turn on terse mode (see
 .Ic terse  .Ic terse
 command below).  command below).
 .It Fl f  .It Fl f
 Fast.  Don't perform any startup action.  Fast.
   Don't perform any startup action.
 .It Fl d  .It Fl d
 Ignore  Ignore
 .Pa .windowrc  .Pa .windowrc
Line 98 
Line 104 
 where  where
 .Ar X  .Ar X
 is any character, meaning  is any character, meaning
 .No control\- Ns Ar X  .  .No control\- Ns Ar X .
 .It Fl c Ar command  .It Fl c Ar command
 Execute the string  Execute the string
 .Ar command  .Ar command
Line 106 
Line 112 
 before doing anything else.  before doing anything else.
 .El  .El
 .Pp  .Pp
 Windows can overlap and are framed as necessary.  Each window  Windows can overlap and are framed as necessary.
 is named by one of the digits 1\-9.  This one-character  Each window is named by one of the digits 1\-9.
   This one-character
 identifier, as well as a user definable label string, are displayed  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  with the window on the top edge of its frame.
 designated to be in the  A window can be designated to be in the
 .Ar foreground  ,  .Ar foreground ,
 in which case it will always be  in which case it will always be
 on top of all normal, non-foreground windows, and can be covered  on top of all normal, non-foreground windows, and can be covered
 only by other foreground windows.  A window need not be completely  only by other foreground windows.
 within the edges of the terminal screen.  Thus a large window  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  (possibly larger than the screen) may be positioned to show only
 a portion of its full size.  a portion of its full size.
 .Pp  .Pp
 Each window has a cursor and a set of control functions.  Most intelligent  Each window has a cursor and a set of control functions.
 terminal operations such as line and  Most intelligent terminal operations such as line and
 character deletion and insertion are supported.  Display modes  character deletion and insertion are supported.
   Display modes
 such as underlining and reverse video are available if they are  such as underlining and reverse video are available if they are
 supported by the terminal.  In addition,  supported by the terminal.
 similar to terminals with multiple pages of memory,  In addition, similar to terminals with multiple pages of memory,
 each window has a text buffer which can have more lines than the window  each window has a text buffer which can have more lines than the window
 itself.  itself.
 .Ss Process Environment  .Ss Process Environment
 With each newly created window, a shell program is spawned with its  With each newly created window, a shell program is spawned with its
 process environment tailored to that window.  Its standard input,  process environment tailored to that window.
   Its standard input,
 output, and diagnostic file descriptors are bound to one end of either  output, and diagnostic file descriptors are bound to one end of either
 a pseudo-terminal  a pseudo-terminal
 .Xr (pty 4 )  .Xr (pty 4 )
Line 141 
Line 152 
 characters and modes (see  characters and modes (see
 .Xr stty 1 )  .Xr stty 1 )
 are copied from the physical  are copied from the physical
 terminal.  A  terminal.
   A
 .Xr termcap 5  .Xr termcap 5
 entry tailored to this window is created  entry tailored to this window is created
 and passed as environment  and passed as environment
 .Xr (environ 5 )  .Xr (environ 5 )
 variable  variable
 .Ev TERMCAP  .  .Ev TERMCAP .
 The termcap entry contains the window's size and  The termcap entry contains the window's size and
 characteristics as well as information from the physical terminal,  characteristics as well as information from the physical terminal,
 such as the existence of underline, reverse video, and other display  such as the existence of underline, reverse video, and other display
 modes, and the codes produced by the terminal's function keys,  modes, and the codes produced by the terminal's function keys,
 if any.  In addition, the window size attributes of the pseudo-terminal  if any.
   In addition, the window size attributes of the pseudo-terminal
 are set to reflect the size of this window, and updated whenever  are set to reflect the size of this window, and updated whenever
 it is changed by the user.  In particular, the editor  it is changed by the user.
   In particular, the editor
 .Xr vi 1  .Xr vi 1
 uses  uses
 this information to redraw its display.  this information to redraw its display.
Line 162 
Line 176 
 During normal execution,  During normal execution,
 .Nm  .Nm
 can be in one of two states:  can be in one of two states:
 conversation mode and command mode.  In conversation mode, the  conversation mode and command mode.
   In conversation mode, the
 terminal's real cursor is placed at the cursor position of a particular  terminal's real cursor is placed at the cursor position of a particular
 window--called the current window--and input from the keyboard is sent  window--called the current window--and input from the keyboard is sent
 to the process in that window.  The current window is always  to the process in that window.
 on top of all other windows, except those in foreground.  In addition,  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.  it is set apart by highlighting its identifier and label in reverse video.
 .Pp  .Pp
 Typing  Typing
Line 174 
Line 191 
 escape character (normally  escape character (normally
 .Ic ^P )  .Ic ^P )
 in conversation  in conversation
 mode switches it into command mode.  In command mode, the top line of  mode switches it into command mode.
   In command mode, the top line of
 the terminal screen becomes the command prompt window, and  the terminal screen becomes the command prompt window, and
 .Nm  .Nm
 interprets input from the keyboard as commands to manipulate windows.  interprets input from the keyboard as commands to manipulate windows.
Line 196 
Line 214 
 .No control\- Ns Ar X ,  .No control\- Ns Ar X ,
 where  where
 .Ar X  .Ar X
 is any character.  In particular,  is any character.
   In particular,
 .Ic ^^  .Ic ^^
 is  is
 .Li control\-^ .  .Li control\-^ .
Line 215 
Line 234 
 but stay in command mode.  but stay in command mode.
 .It Ic ^^  .It Ic ^^
 Select the previous window and return to conversation  Select the previous window and return to conversation
 mode.  This is useful for toggling between two windows.  mode.
   This is useful for toggling between two windows.
 .It Ic escape  .It Ic escape
 Return to conversation mode.  Return to conversation mode.
 .It Ic ^P  .It Ic ^P
 Return to conversation mode and write  Return to conversation mode and write
 .Ic ^P  .Ic ^P
 to the  to the
 current window.  Thus, typing two  current window.
   Thus, typing two
 .Ic ^P Ns 's  .Ic ^P Ns 's
 in conversation  in conversation
 mode sends one to the current window.  If the  mode sends one to the current window.
   If the
 .Nm  .Nm
 escape is changed to some other character, that  escape is changed to some other character, that
 character takes the place of  character takes the place of
Line 243 
Line 265 
 Suspend  Suspend
 .Nm window .  .Nm window .
 .It Ic w  .It Ic w
 Create a new window.  The user is prompted for the positions  Create a new window.
   The user is prompted for the positions
 of the upper left and lower right corners of the window.  of the upper left and lower right corners of the window.
 The cursor is placed on the screen and the keys  The cursor is placed on the screen and the keys
 .Sq h ,  .Sq h ,
Line 259 
Line 282 
 and  and
 .Sq L  .Sq L
 move the cursor to the respective  move the cursor to the respective
 limits of the screen.  Typing a number before the movement keys  limits of the screen.
 repeats the movement that number of times.  Return enters the cursor position  Typing a number before the movement keys
 as the upper left corner of the window.  The lower right corner  repeats the movement that number of times.
 is entered in the same manner.  During this process,  Return enters the cursor position as the upper left corner of the window.
   The lower right corner
   is entered in the same manner.
   During this process,
 the placement of the new window is indicated by a rectangular  the placement of the new window is indicated by a rectangular
 box drawn on the screen, corresponding to where the new window  box drawn on the screen, corresponding to where the new window
 will be framed.  Typing escape at any point  will be framed.
 cancels this command.  Typing escape at any point cancels this command.
 .Pp  .Pp
 This window becomes the current window,  This window becomes the current window,
 and is given the first available ID.  The default buffer size  and is given the first available ID.
 is used (see  The default buffer size is used (see
 .Ar default_nline  .Ar default_nline
 command below).  command below).
 .Pp  .Pp
Line 287 
Line 313 
 .It Ic m Ns Ar #  .It Ic m Ns Ar #
 Move window  Move window
 .Ar #  .Ar #
 to another location.  A box in the shape  to another location.
 of the window is drawn on  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  the screen to indicate the new position of the window, and the same keys as
 those for the  those for the
 .Ic w  .Ic w
 command are used to position the box.  The  command are used to position the box.
 window can be moved partially off-screen.  The window can be moved partially off-screen.
 .It Ic M Ns Ar #  .It Ic M Ns Ar #
 Move window  Move window
 .Ar #  .Ar #
Line 302 
Line 328 
 Change the size of window  Change the size of window
 .Ar # .  .Ar # .
 The user is prompted  The user is prompted
 to enter the new lower right corner of the window.  A box  to enter the new lower right corner of the window.
 is drawn to indicate the new window size.  The same  A box is drawn to indicate the new window size.
 keys used in  The same keys used in
 .Ic w  .Ic w
 and  and
 .Ic m  .Ic m
Line 334 
Line 360 
 .It Ic l  .It Ic l
 Move the cursor of the current window right by one column.  Move the cursor of the current window right by one column.
 .It Ic y  .It Ic y
 Yank.  The user is prompted to enter two points within the current  Yank.
 window.  Then the content of the current window between those two points  The user is prompted to enter two points within the current window.
   Then the content of the current window between those two points
 is saved in the yank buffer.  is saved in the yank buffer.
 .It Ic p  .It Ic p
 Put.  The content of the yank buffer is written to the current  Put.
 window as input.  The content of the yank buffer is written to the current window as input.
 .It Ic ^S  .It Ic ^S
 Stop output in the current window.  Stop output in the current window.
 .It Ic ^Q  .It Ic ^Q
Line 353 
Line 380 
 .Ss Long Commands  .Ss Long Commands
 Long commands are a sequence of statements  Long commands are a sequence of statements
 parsed much like a programming language, with a syntax  parsed much like a programming language, with a syntax
 similar to that of C.  Numeric and string expressions and variables  similar to that of C.
   Numeric and string expressions and variables
 are supported, as well as conditional statements.  are supported, as well as conditional statements.
 .Pp  .Pp
 There are two data types: string and number.  A string is a sequence  There are two data types: string and number.
 of letters or digits beginning with a letter.  A string is a sequence of letters or digits beginning with a letter.
 .Ql _  .Ql _
 and  and
 .Ql \&.  .Ql \&.
 are considered letters.  Alternately, non-alphanumeric characters can  are considered letters.
   Alternately, non-alphanumeric characters can
 be included in strings by quoting them in  be included in strings by quoting them in
 .Ql \&"  .Ql \&"
 or escaping them with  or escaping them with
Line 373 
Line 402 
 .Ql \en  .Ql \en
 is a newline,  is a newline,
 .Ql \er  .Ql \er
 a carriage return).  For example, these are legal strings:  a carriage return).
   For example, these are legal strings:
 abcde01234, "&#$^*&#", ab"$#"cd, ab\\$\\#cd, "/usr/ucb/window".  abcde01234, "&#$^*&#", ab"$#"cd, ab\\$\\#cd, "/usr/ucb/window".
 .Pp  .Pp
 A number is an integer value in one of three forms:  A number is an integer value in one of three forms:
Line 385 
Line 415 
 .Sq 0X .  .Sq 0X .
 The natural  The natural
 machine integer size is used (i.e., the signed integer type  machine integer size is used (i.e., the signed integer type
 of the C compiler).  As in C, a non-zero number represents  of the C compiler).
   As in C, a non-zero number represents
 a boolean true.  a boolean true.
 .Pp  .Pp
 The character  The character
 .Ql #  .Ql #
 begins a comment which terminates at the end of the line.  begins a comment which terminates at the end of the line.
 .Pp  .Pp
 A statement is either a conditional or an expression.  Expression  A statement is either a conditional or an expression.
 statements are terminated with a new line or  Expression statements are terminated with a new line or
 .Ql \&; .  .Ql \&; .
 To continue  To continue
 an expression on the next line, terminate the first line with  an expression on the next line, terminate the first line with
Line 429 
Line 460 
 .Nm  .Nm
 are similar to those in the  are similar to those in the
 C language, with most C operators supported on numeric  C language, with most C operators supported on numeric
 operands.  In addition, some are overloaded to operate on strings.  operands.
   In addition, some are overloaded to operate on strings.
 .Pp  .Pp
 When an expression is used as a statement, its value is discarded  When an expression is used as a statement, its value is discarded
 after evaluation.  Therefore, only expressions with side  after evaluation.
   Therefore, only expressions with side
 effects (assignments and function calls) are useful as statements.  effects (assignments and function calls) are useful as statements.
 .Pp  .Pp
 Single valued (no arrays) variables are supported, of both  Single valued (no arrays) variables are supported, of both
 numeric and string values.  Some variables are predefined.  They  numeric and string values.
 are listed below.  Some variables are predefined.
   They are listed below.
 .Pp  .Pp
 The operators in order of increasing precedence:  The operators in order of increasing precedence:
 .Bl -tag -width Fl  .Bl -tag -width Fl
Line 446 
Line 480 
 .Ic =  .Ic =
 .Aq Va expr2  .Aq Va expr2
 .Xc  .Xc
 Assignment.  The variable of name  Assignment.
   The variable of name
 .Aq Va expr1 ,  .Aq Va expr1 ,
 which must be string valued,  which must be string valued,
 is assigned the result of  is assigned the result of
Line 467 
Line 502 
 evaluates true  evaluates true
 (non-zero numeric value); returns the value of  (non-zero numeric value); returns the value of
 .Aq Va expr3  .Aq Va expr3
 otherwise.  Only  otherwise.
 one of  Only one of
 .Aq Va expr2  .Aq Va expr2
 and  and
 .Aq Va expr3  .Aq Va expr3
Line 481 
Line 516 
 .Ic \&|\&|  .Ic \&|\&|
 .Aq Va expr2  .Aq Va expr2
 .Xc  .Xc
 Logical or.  Numeric values only.  Short circuit evaluation is supported  Logical or.
 (i.e., if  Numeric values only.
   Short circuit evaluation is supported (i.e., if
 .Aq Va expr1  .Aq Va expr1
 evaluates true, then  evaluates true, then
 .Aq Va expr2  .Aq Va expr2
Line 492 
Line 528 
 .Ic \&&\&&  .Ic \&&\&&
 .Aq Va expr2  .Aq Va expr2
 .Xc  .Xc
 Logical and with short circuit evaluation.  Numeric values only.  Logical and with short circuit evaluation.
   Numeric values only.
 .It Xo  .It Xo
 .Aq Va expr1  .Aq Va expr1
 .Ic \&|  .Ic \&|
 .Aq Va expr2  .Aq Va expr2
 .Xc  .Xc
 Bitwise or.  Numeric values only.  Bitwise or.
   Numeric values only.
 .It Xo  .It Xo
 .Aq Va expr1  .Aq Va expr1
 .Ic ^  .Ic ^
 .Aq Va expr2  .Aq Va expr2
 .Xc  .Xc
 Bitwise exclusive or.  Numeric values only.  Bitwise exclusive or.
   Numeric values only.
 .It Xo  .It Xo
 .Aq Va expr1  .Aq Va expr1
 .Ic \&&  .Ic \&&
 .Aq Va expr2  .Aq Va expr2
 .Xc  .Xc
 Bitwise and.  Numeric values only.  Bitwise and.
   Numeric values only.
 .It Xo  .It Xo
 .Aq Va expr1  .Aq Va expr1
 .Ic ==  .Ic ==
Line 519 
Line 559 
 .Ic !=  .Ic !=
 .Aq expr2  .Aq expr2
 .Xc  .Xc
 Comparison (equal and not equal, respectively).  The boolean  Comparison (equal and not equal, respectively).
 result (either 1 or 0) of the comparison is returned.  The  The boolean
 operands can be numeric or string valued.  One string operand  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.  forces the other to be converted to a string in necessary.
 .It Xo  .It Xo
 .Aq Va expr1  .Aq Va expr1
Line 535 
Line 577 
 .Aq Va expr2 ,  .Aq Va expr2 ,
 .Xc  .Xc
 Less than, greater than, less than or equal to,  Less than, greater than, less than or equal to,
 greater than or equal to.  Both numeric and string values, with  greater than or equal to.
 automatic conversion as above.  Both numeric and string values, with automatic conversion as above.
 .It Xo  .It Xo
 .Aq Va expr1  .Aq Va expr1
 .Ic <<  .Ic <<
Line 550 
Line 592 
 is bit  is bit
 shifted left (or right) by  shifted left (or right) by
 .Aq Va expr2  .Aq Va expr2
 bits.  If  bits.
   If
 .Aq Va expr1  .Aq Va expr1
 is  is
 a string, then its first (or last)  a string, then its first (or last)
Line 568 
Line 611 
 .Ic -  .Ic -
 .Aq Va expr2  .Aq Va expr2
 .Xc  .Xc
 Addition and subtraction on numbers.  For  Addition and subtraction on numbers.
   For
 .Ql + ,  .Ql + ,
 if one  if one
 argument is a string, then the other is converted to a string,  argument is a string, then the other is converted to a string,
Line 584 
Line 628 
 .Ic \&%  .Ic \&%
 .Aq Va expr2  .Aq Va expr2
 .Xc  .Xc
 Multiplication, division, modulo.  Numbers only.  Multiplication, division, modulo.
   Numbers only.
 .It Xo  .It Xo
 .Ic \- Ns Aq Va expr ,  .Ic \- Ns Aq Va expr ,
 .Ic ~ Ns Aq Va expr ,  .Ic ~ Ns Aq Va expr ,
Line 593 
Line 638 
 .Ic \&$? Ns Aq Va expr  .Ic \&$? Ns Aq Va expr
 .Xc  .Xc
 The first three are unary minus, bitwise complement and logical complement  The first three are unary minus, bitwise complement and logical complement
 on numbers only.  The operator,  on numbers only.
   The operator,
 .Ql $ ,  .Ql $ ,
 takes  takes
 .Aq Va expr  .Aq Va expr
 and returns  and returns
 the value of the variable of that name.  If  the value of the variable of that name.
   If
 .Aq Va expr  .Aq Va expr
 is numeric  is numeric
 with value  with value
Line 619 
Line 666 
 prefix of the name of a built-in  prefix of the name of a built-in
 .Nm  .Nm
 function  function
 or the full name of a user defined alias macro.  In the case of a built-in  or the full name of a user defined alias macro.
 function,  In the case of a built-in function,
 .Aq Ar arglist  .Aq Ar arglist
 can be in one of two forms:  can be in one of two forms:
 .Bd -literal -offset indent  .Bd -literal -offset indent
Line 629 
Line 676 
 .Ed  .Ed
 .Pp  .Pp
 The two forms can in fact be intermixed, but the result is  The two forms can in fact be intermixed, but the result is
 unpredictable.  Most arguments can be omitted; default values will  unpredictable.
 be supplied for them.  The  Most arguments can be omitted; default values will
   be supplied for them.
   The
 .Ar argnames  .Ar argnames
 can be unique prefixes  can be unique prefixes
 of the argument names.  The commas separating  of the argument names.
   The commas separating
 arguments are used only to disambiguate, and can usually be omitted.  arguments are used only to disambiguate, and can usually be omitted.
 .Pp  .Pp
 Only the first argument form is valid for user defined aliases.  Aliases  Only the first argument form is valid for user defined aliases.
 are defined using the  Aliases are defined using the
 .Ic alias  .Ic alias
 built-in function (see below).  Arguments  built-in function (see below).
 are accessed via a variant of the variable mechanism (see the  Arguments are accessed via a variant of the variable mechanism (see the
 .Ql $  .Ql $
 operator above).  operator above).
 .Pp  .Pp
 Most functions return value, but some are used for side effect  Most functions return value, but some are used for side effect
 only and so must be used as statements.  When a function or an alias is used  only and so must be used as statements.
   When a function or an alias is used
 as a statement, the parentheses surrounding  as a statement, the parentheses surrounding
 the argument list may be omitted.  Aliases return no value.  the argument list may be omitted.
   Aliases return no value.
 .El  .El
 .Ss  Built-in Functions  .Ss Built-in functions
 The arguments are listed by name in their natural  The arguments are listed by name in their natural
 order.  Optional arguments are in square brackets  order.
   Optional arguments are in square brackets
 .Sq Op .  .Sq Op .
 Arguments  Arguments
 that have no names are in angle brackets  that have no names are in angle brackets
Line 675 
Line 728 
 .Bq Aq Ar string\-list Pc  .Bq Aq Ar string\-list Pc
 .Xc  .Xc
 If no argument is given, all currently defined alias macros are  If no argument is given, all currently defined alias macros are
 listed.  Otherwise,  listed.
   Otherwise,
 .Aq Ar string  .Aq Ar string
 is defined as an alias,  is defined as an alias,
 with expansion  with expansion
 .Aq Ar string\-list > .  .Aq Ar string\-list > .
 The previous definition of  The previous definition of
 .Aq Ar string ,  .Aq Ar string ,
 if any, is returned.  Default for  if any, is returned.
   Default for
 .Aq Ar string\-list  .Aq Ar string\-list
 is no change.  is no change.
 .It Ic close Ns Pq Aq Ar window\-list  .It Ic close Ns Pq Aq Ar window\-list
Line 691 
Line 746 
 If  If
 .Aq Ar window\-list  .Aq Ar window\-list
 is the word  is the word
 .Ar all  ,  .Ar all ,
 than all windows are closed.  No value is returned.  than all windows are closed.
   No value is returned.
 .It Ic cursormodes Ns Pq Bq Ar modes  .It Ic cursormodes Ns Pq Bq Ar modes
 Set the window cursor to  Set the window cursor to
 .Ar modes  .  .Ar modes .
 .Ar Modes  .Ar Modes
 is the bitwise  is the bitwise
 or of the mode bits defined as the variables  or of the mode bits defined as the variables
Line 707 
Line 763 
 (blinking),  (blinking),
 and  and
 .Ar m_grp  .Ar m_grp
 (graphics, terminal dependent).  Return  (graphics, terminal dependent).
 value is the previous modes.  Default is no change.  Return value is the previous modes.
   Default is no change.
 For example,  For example,
 .Li cursor($m_rev$m_blk)  .Li cursor($m_rev$m_blk)
 sets the window cursors to blinking  sets the window cursors to blinking
 reverse video.  reverse video.
 .It Ic default_nline Ns Pq Bq Ar nline  .It Ic default_nline Ns Pq Bq Ar nline
 Set the default buffer size to  Set the default buffer size to
 .Ar nline  .  .Ar nline .
 Initially, it is  Initially, it is 48 lines.
 48 lines.  Returns the old default buffer size.  Default is  Returns the old default buffer size.
 no change.  Using a very large buffer can slow the program down  Default is no change.
 considerably.  Using a very large buffer can slow the program down considerably.
 .It Ic default_shell Ns Pq Bq Aq Ar string\-list  .It Ic default_shell Ns Pq Bq Aq Ar string\-list
 Set the default window shell program to  Set the default window shell program to
 .Aq Ar string\-list .  .Aq Ar string\-list .
 Returns  Returns the first string in the old shell setting.
 the first string in the old shell setting.  Default is no change.  Initially,  Default is no change.
 the default shell is taken from the environment variable  Initially, the default shell is taken from the environment variable
 .Ev SHELL  .  .Ev SHELL .
 .It Ic default_smooth Ns Pq Bq Ar flag  .It Ic default_smooth Ns Pq Bq Ar flag
 Set the default value of the  Set the default value of the
 .Ar smooth  .Ar smooth
 argument  argument
 to the command  to the command
 .Nm  .Nm
 (see below).  The argument  (see below).
 is a boolean flag (one of  The argument is a boolean flag (one of
 .Ar on  ,  .Ar on ,
 .Ar off  ,  .Ar off ,
 .Ar yes  ,  .Ar yes ,
 .Ar no  ,  .Ar no ,
 .Ar true  ,  .Ar true ,
 .Ar false  ,  .Ar false ,
 or a number,  or a number,
 as described above).  Default is no change.  as described above).
   Default is no change.
 The old value (as a number) is returned.  The old value (as a number) is returned.
 The initial value is 1 (true).  The initial value is 1 (true).
 .It Xo  .It Xo
Line 754 
Line 812 
 to  to
 .Nm window ,  .Nm window ,
 separated  separated
 by spaces and terminated with a new line.  The strings are only  by spaces and terminated with a new line.
   The strings are only
 displayed in the window, the processes in the window are not  displayed in the window, the processes in the window are not
 involved (see  involved (see
 .Ic write  .Ic write
 below).  No value is returned.  Default  below).
 is the current window.  No value is returned.
   Default is the current window.
 .It Ic escape Ns Pq Bq Ar escapec  .It Ic escape Ns Pq Bq Ar escapec
 Set the escape character to  Set the escape character to
 .Ar escape-char  .  .Ar escape-char .
 Returns the old  Returns the old
 escape character as a one-character string.  Default is no  escape character as a one-character string.
 change.  Default is no change.
 .Ar Escapec  .Ar Escapec
 can be a string of a single character, or  can be a string of a single character, or
 in the form  in the form
Line 780 
Line 840 
 .Nm  .Nm
 in or out of foreground.  in or out of foreground.
 .Ar Flag  .Ar Flag
 is a boolean value.  The old foreground flag  is a boolean value.
 is returned.  Default for  The old foreground flag is returned.
   Default for
 .Nm  .Nm
 is the current window,  is the current window,
 default for  default for
Line 794 
Line 855 
 Set the label of  Set the label of
 .Nm  .Nm
 to  to
 .Ar label  .  .Ar label .
 Returns the old  Returns the old label as a string.
 label as a string.  Default for  Default for
 .Nm  .Nm
 is the current  is the current
 window, default for  window, default for
 .Ar label  .Ar label
 is no change.  To turn  is no change.
 off a label, set it to an empty string ("").  To turn off a label, set it to an empty string ("").
 .It Ic list Ns Pq  .It Ic list Ns Pq
 No arguments.  List the identifiers and labels of all windows.  No  No arguments.
 value is returned.  List the identifiers and labels of all windows.
   No value is returned.
 .It Ic select Ns Pq Bq Ar window  .It Ic select Ns Pq Bq Ar window
 Make  Make
 .Nm  .Nm
 the current window.  The previous current window  the current window.
 is returned.  Default is no change.  The previous current window is returned.
   Default is no change.
 .It Ic source Ns Pq Ar filename  .It Ic source Ns Pq Ar filename
 Read and execute the long commands in  Read and execute the long commands in
 .Ar filename  .  .Ar filename .
 Returns \-1 if the file cannot be read, 0 otherwise.  Returns \-1 if the file cannot be read, 0 otherwise.
 .It Ic terse Ns Pq Bq flag  .It Ic terse Ns Pq Bq flag
 Set terse mode to  Set terse mode to
 .Ar flag  .  .Ar flag .
 In terse mode, the command window  In terse mode, the command window
 stays hidden even in command mode, and errors are reported by  stays hidden even in command mode, and errors are reported by
 sounding the terminal's bell.  sounding the terminal's bell.
Line 825 
Line 888 
 can take on the same  can take on the same
 values as in  values as in
 .Ar foreground  .Ar foreground
 above.  Returns the old terse flag.  above.
   Returns the old terse flag.
 Default is no change.  Default is no change.
 .It Ic unalias Ns Pq Ar alias  .It Ic unalias Ns Pq Ar alias
 Undefine  Undefine
 .Ar alias  .  .Ar alias .
 Returns -1 if  Returns -1 if
 .Ar alias  .Ar alias
 does not exist,  does not exist,
 0 otherwise.  0 otherwise.
 .It Ic unset Ns Pq Ar variable  .It Ic unset Ns Pq Ar variable
 Undefine  Undefine
 .Ar variable  .  .Ar variable .
 Returns -1 if  Returns -1 if
 .Ar variable  .Ar variable
 does not exist,  does not exist,
 0 otherwise.  0 otherwise.
 .It Ic variables Ns Pq  .It Ic variables Ns Pq
 No arguments.  List all variables.  No value is returned.  No arguments.
   List all variables.
   No value is returned.
 .It Xo  .It Xo
 .Ic window Ns ( Bq Ar row ,  .Ic window Ns ( Bq Ar row ,
 .Bq Ar column ,  .Bq Ar column ,
Line 858 
Line 924 
 .Bq Ar shell ) .  .Bq Ar shell ) .
 .Xc  .Xc
 Open a window with upper left corner at  Open a window with upper left corner at
 .Ar row  ,  .Ar row ,
 .Ar column  .Ar column
 and size  and size
 .Ar nrow  ,  .Ar nrow ,
 .Ar ncol  .  .Ar ncol .
 If  If
 .Ar nline  .Ar nline
 is specified,  is specified,
 then that many lines are allocated for the text buffer.  Otherwise,  then that many lines are allocated for the text buffer.
 the default buffer size is used.  Default values for  Otherwise, the default buffer size is used.
 .Ar row  ,  Default values for
 .Ar column  ,  .Ar row ,
 .Ar nrow  ,  .Ar column ,
   .Ar nrow ,
 and  and
 .Ar ncol  .Ar ncol
 are, respectively,  are, respectively,
Line 878 
Line 945 
 screen.  screen.
 .Ar Label  .Ar Label
 is the label string.  is the label string.
 .Ar Frame  ,  .Ar Frame ,
 .Ar pty  ,  .Ar pty ,
 and  and
 .Ar mapnl  .Ar mapnl
 are flag values  are flag values
Line 891 
Line 958 
 true), and map new line characters in this window to carriage return  true), and map new line characters in this window to carriage return
 and line feed (default true if socketpair is used, false otherwise).  and line feed (default true if socketpair is used, false otherwise).
 Normally, a window is automatically closed when its process  Normally, a window is automatically closed when its process
 exits.  Setting  exits.
   Setting
 .Ar keepopen  .Ar keepopen
 to true (default false) prevents this  to true (default false) prevents this
 action.  When  action.
   When
 .Ar smooth  .Ar smooth
 is true, the screen is updated more frequently  is true, the screen is updated more frequently
 (for this window) to produce a more terminal-like behavior.  (for this window) to produce a more terminal-like behavior.
Line 908 
Line 977 
 program to place in the window (default is the program specified  program to place in the window (default is the program specified
 by  by
 .Ar default_shell ,  .Ar default_shell ,
 see above).  The created window's identifier  see above).
 is returned as a number.  The created window's identifier is returned as a number.
 .It Xo  .It Xo
 .Ic write Ns ( Bq Ar window ,  .Ic write Ns ( Bq Ar window ,
 .Bq Aq Ar string\-list )  .Bq Aq Ar string\-list )
Line 919 
Line 988 
 to  to
 .Nm window ,  .Nm window ,
 separated  separated
 by spaces but not terminated with a new line.  The strings are actually  by spaces but not terminated with a new line.
 given to the window as input.  No value is returned.  Default  The strings are actually given to the window as input.
 is the current window.  No value is returned.
   Default is the current window.
 .El  .El
 .Ss Predefined Variables  .Ss Predefined Variables
 These variables are for information only.  Redefining them does  These variables are for information only.
 not affect the internal operation of  Redefining them does not affect the internal operation of
 .Nm window .  .Nm window .
 .Bl -tag -width modes  .Bl -tag -width modes
 .It Ar baud  .It Ar baud
 The baud rate as a number between 50 and 38400.  The baud rate as a number between 50 and 38400.
 .It Ar modes  .It Ar modes
 The display modes (reverse video, underline, blinking, graphics)  The display modes (reverse video, underline, blinking, graphics)
 supported by the physical terminal.  The value of  supported by the physical terminal.
   The value of
 .Ar modes  .Ar modes
 is the bitwise or of some of the one bit values,  is the bitwise or of some of the one bit values,
 .Ar m_blk ,  .Ar m_blk ,
Line 958 
Line 1029 
 .It Ar nrow  .It Ar nrow
 The number of rows on the physical screen.  The number of rows on the physical screen.
 .It Ar term  .It Ar term
 The terminal type.  The standard name, found in the second name  The terminal type.
 field of the terminal's  The standard name, found in the second name field of the terminal's
 .Ev TERMCAP  .Ev TERMCAP
 entry, is used.  entry, is used.
 .Sh ENVIRONMENT  .Sh ENVIRONMENT

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9