SCCS-vsn: usr.bin/expand/expand.1 6.7
SCCS-vsn: usr.bin/window/window.1 6.15
.\" Copyright (c) 1980, 1990 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" Copyright (c) 1980, 1990 The Regents of the University of California.
.\" All rights reserved.
.\"
-.\" %sccs.include.redist.man%
+.\" %sccs.include.redist.roff%
-.\" @(#)expand.1 6.6 (Berkeley) %G%
+.\" @(#)expand.1 6.7 (Berkeley) %G%
.Dd
.Dt EXPAND 1
.Os BSD 4
.Dd
.Dt EXPAND 1
.Os BSD 4
.Nd expand tabs to spaces, and vice versa
.Sh SYNOPSIS
.Nm expand
.Nd expand tabs to spaces, and vice versa
.Sh SYNOPSIS
.Nm expand
-.Oo
-.Op Fl Ar tabstop
-.Op Fl Ar tab1,tab2,...,tabn
-.Oo
+.Op Fl Ns Ar tabstop
+.Op Fl Ns Ar tab1,tab2,...,tabn
.Ar
.Nm unexpand
.Op Fl a
.Ar
.Nm unexpand
.Op Fl a
Option (with
.Nm unexpand
only):
Option (with
.Nm unexpand
only):
+.Bl -tag -width flag
+.It Fl a
By default, only leading blanks and tabs
are reconverted to maximal strings of tabs. If the
.Fl a
option is given, then tabs are inserted whenever they would compress the
resultant file by replacing two or more characters.
By default, only leading blanks and tabs
are reconverted to maximal strings of tabs. If the
.Fl a
option is given, then tabs are inserted whenever they would compress the
resultant file by replacing two or more characters.
-.Nm Expand
-appeared in 3 BSD.
+The
+.Nm expand
+command appeared in
+.Bx 3.0 .
.\" This code is derived from software contributed to Berkeley by
.\" Edward Wang at The University of California, Berkeley.
.\"
.\" This code is derived from software contributed to Berkeley by
.\" Edward Wang at The University of California, Berkeley.
.\"
-.\" %sccs.include.redist.man%
+.\" %sccs.include.redist.roff%
-.\" @(#)window.1 6.14 (Berkeley) %G%
+.\" @(#)window.1 6.15 (Berkeley) %G%
.Dd
.Dt WINDOW 1
.Os BSD 4.3
.Dd
.Dt WINDOW 1
.Os BSD 4.3
.Sh DESCRIPTION
.Nm Window
implements a window environment on
.Sh DESCRIPTION
.Nm Window
implements a window environment on
.Pp
A window is a rectangular portion of the physical terminal
screen associated with a set of processes. Its size and
.Pp
A window is a rectangular portion of the physical terminal
screen associated with a set of processes. Its size and
the terminal screen are created by default.
.Pp
The command line options are
the terminal screen are created by default.
.Pp
The command line options are
+.Bl -tag -width Fl
+.It Fl t
Turn on terse mode (see
.Ic terse
command below).
Turn on terse mode (see
.Ic terse
command below).
Fast. Don't perform any startup action.
Fast. Don't perform any startup action.
Ignore
.Pa .windowrc
and create the two default
windows instead.
Ignore
.Pa .windowrc
and create the two default
windows instead.
-.Tp Cx Fl e
-.Cx \&\ \&
-.Ar escape-char
-.Cx
Set the escape character to
.Ar escape-char .
.Ar Escape-char
Set the escape character to
.Ar escape-char .
.Ar Escape-char
where
.Ar X
is any character, meaning
where
.Ar X
is any character, meaning
-.Cx control\-
-.Ar X .
-.Cx
-.Tp Cx Fl c
-.Cx \&\ \&
-.Ar command
-.Cx
+.No control\- Ns Ar X .
+.It Fl c Ar command
Execute the string
.Ar command
as a long command (see below)
before doing anything else.
Execute the string
.Ar command
as a long command (see below)
before doing anything else.
.Pp
Windows can overlap and are framed as necessary. Each window
is named by one of the digits ``1'' to ``9''. This one-character
.Pp
Windows can overlap and are framed as necessary. Each window
is named by one of the digits ``1'' to ``9''. This one-character
output, and diagnostic file descriptors are bound to one end of either
a pseudo-terminal
.Xr (pty 4 )
output, and diagnostic file descriptors are bound to one end of either
a pseudo-terminal
.Xr (pty 4 )
+or a
+.Ux
+domain socket
.Xr (socketpair 4 ) .
If a pseudo-terminal is used, then its special
characters and modes (see
.Xr (socketpair 4 ) .
If a pseudo-terminal is used, then its special
characters and modes (see
it is set apart by highlighting its identifier and label in reverse video.
.Pp
Typing
it is set apart by highlighting its identifier and label in reverse video.
.Pp
Typing
-.Cx Nm window
-.Cx 's
-.Cx
escape character (normally
.Ic ^P )
in conversation
escape character (normally
.Ic ^P )
in conversation
below).
.Ss Short Commands
Below,
below).
.Ss Short Commands
Below,
represents one of the digits ``1'' to ``9''
corresponding to the windows 1 to 9.
.Ic ^X
means
represents one of the digits ``1'' to ``9''
corresponding to the windows 1 to 9.
.Ic ^X
means
-.Cx control\-
-.Ar X ,
-.Cx
where
.Ar X
is any character. In particular,
where
.Ar X
is any character. In particular,
.Li control\-^.
.Ar Escape
is the escape key, or
.Li control\-^.
.Ar Escape
is the escape key, or
-.Ic ^\&[
-.Tw Ds
-.Tp Ar #
+.Ic ^\&[ .
+.Bl -tag -width Ds
+.It Ar #
Select window
.Ar #
as the current window
and return to conversation mode.
Select window
.Ar #
as the current window
and return to conversation mode.
Select window
.Ar #
but stay in command mode.
Select window
.Ar #
but stay in command mode.
Select the previous window and return to conversation
mode. This is useful for toggling between two windows.
Select the previous window and return to conversation
mode. This is useful for toggling between two windows.
Return to conversation mode.
Return to conversation mode.
Return to conversation mode and write
.Ic ^P
to the
current window. Thus, typing two
Return to conversation mode and write
.Ic ^P
to the
current window. Thus, typing two
in conversation
mode sends one to the current window. If the
.Nm window
in conversation
mode sends one to the current window. If the
.Nm window
character takes the place of
.Ic ^P
here.
character takes the place of
.Ic ^P
here.
List a short summary of commands.
List a short summary of commands.
Exit
.Nm window .
Confirmation is requested.
Exit
.Nm window .
Confirmation is requested.
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'',
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'',
command below).
.Pp
Only fully visible windows can be created this way.
command below).
.Pp
Only fully visible windows can be created this way.
Close window
.Ar # .
The process in the window is sent
Close window
.Ar # .
The process in the window is sent
.Xr Csh 1
should
handle this signal correctly and cause no problems.
.Xr Csh 1
should
handle this signal correctly and cause no problems.
Move window
.Ar #
to another location. A box in the shape
Move window
.Ar #
to another location. A box in the shape
.Ic w
command are used to position the box. The
window can be moved partially off-screen.
.Ic w
command are used to position the box. The
window can be moved partially off-screen.
Move window
.Ar #
to its previous position.
Move window
.Ar #
to its previous position.
Change the size of window
.Ar # .
The user is prompted
Change the size of window
.Ar # .
The user is prompted
and
.Ic m
are used to enter the position.
and
.Ic m
are used to enter the position.
Change window
.Ar #
to its previous size.
Change window
.Ar #
to its previous size.
Scroll the current window up by one line.
Scroll the current window up by one line.
Scroll the current window down by one line.
Scroll the current window down by one line.
Scroll the current window up by half the window size.
Scroll the current window up by half the window size.
Scroll the current window down by half the window size.
Scroll the current window down by half the window size.
Scroll the current window up by the full window size.
Scroll the current window up by the full window size.
Scroll the current window down by the full window size.
Scroll the current window down by the full window size.
Move the cursor of the current window left by one column.
Move the cursor of the current window left by one column.
Move the cursor of the current window down by one line.
Move the cursor of the current window down by one line.
Move the cursor of the current window up by one line.
Move the cursor of the current window up by one line.
Move the cursor of the current window right by one column.
Move the cursor of the current window right by one column.
Stop output in the current window.
Stop output in the current window.
Start output in the current window.
Start output in the current window.
Enter a line to be executed as long commands.
Normal line
editing characters (erase character, erase word, erase line)
are supported.
Enter a line to be executed as long commands.
Normal line
editing characters (erase character, erase word, erase line)
are supported.
.Ss Long Commands
Long commands are a sequence of statements
parsed much like a programming language, with a syntax
.Ss Long Commands
Long commands are a sequence of statements
parsed much like a programming language, with a syntax
has a single control structure:
the fully bracketed if statement in the form
.Pp
has a single control structure:
the fully bracketed if statement in the form
.Pp
+.Bd -literal -offset indent -compact
if <expr> then
\t<statement>
\t...
if <expr> then
\t<statement>
\t...
\t<statement>
\t...
endif
\t<statement>
\t...
endif
are listed below.
.Pp
The operators in order of increasing precedence:
are listed below.
.Pp
The operators in order of increasing precedence:
-.Tw Fl
-.Tp Cx <
-.Va expr1
-.Cx >
-.Cx \&\ \&
+.Bl -tag -width Fl
+.It Xo
+.Aq Va expr1
-.Cx \&\ \&
-.Cx <
-.Va expr2
-.Cx >
-.Cx
Assignment. The variable of name
Assignment. The variable of name
-.Cx <
-.Va expr1
-.Cx >,
-.Cx
which must be string valued,
is assigned the result of
which must be string valued,
is assigned the result of
-.Cx <
-.Va expr2
-.Cx >.
-.Cx
-.Cx <
-.Va expr2
-.Cx >.
-.Cx
-.Tp Cx <
-.Va expr1
-.Cx >
-.Cx \&\ \&
+.Aq Va expr2 .
+.It Xo
+.Aq Va expr1
-.Cx \&\ \&
-.Cx <
-.Va expr2
-.Cx >
-.Cx \&\ \&
-.Cx \&\ \&
-.Cx <
-.Va expr3
-.Cx >
-.Cx
-.Cx <
-.Va expr2
-.Cx >
-.Cx
-.Cx <
-.Va expr1
-.Cx >
-.Cx
evaluates true
(non-zero numeric value); returns the value of
evaluates true
(non-zero numeric value); returns the value of
-.Cx <
-.Va expr3
-.Cx >
-.Cx
-.Cx <
-.Va expr2
-.Cx >
-.Cx
-.Cx <
-.Va expr3
-.Cx >
-.Cx
-.Cx <
-.Va Expr1
-.Cx >
-.Cx
-.Tp Cx <
-.Va expr1
-.Cx >
-.Cx \&\ \&
-.Cx \&\ \&
-.Cx <
-.Va expr2
-.Cx >
-.Cx
Logical or. Numeric values only. Short circuit evaluation is supported
(i.e., if
Logical or. Numeric values only. Short circuit evaluation is supported
(i.e., if
-.Cx <
-.Va expr1
-.Cx >
-.Cx
-.Cx <
-.Va expr2
-.Cx >
-.Cx
-.Tp Cx <
-.Va expr1
-.Cx >
-.Cx \&\ \&
-.Cx \&\ \&
-.Cx <
-.Va expr2
-.Cx >
-.Cx
Logical and with short circuit evaluation. Numeric values only.
Logical and with short circuit evaluation. Numeric values only.
-.Tp Cx <
-.Va expr1
-.Cx >
-.Cx \&\ \&
-.Cx \&\ \&
-.Cx <
-.Va expr2
-.Cx >
-.Cx
Bitwise or. Numeric values only.
Bitwise or. Numeric values only.
-.Tp Cx <
-.Va expr1
-.Cx >
-.Cx \&\ \&
-.Cx \&\ \&
-.Cx <
-.Va expr2
-.Cx >
-.Cx
Bitwise exclusive or. Numeric values only.
Bitwise exclusive or. Numeric values only.
-.Tp Cx <
-.Va expr1
-.Cx >
-.Cx \&\ \&
-.Cx \&\ \&
-.Cx <
-.Va expr2
-.Cx >
-.Cx
Bitwise and. Numeric values only.
Bitwise and. Numeric values only.
-.Tp Cx <
-.Va expr1
-.Cx >
-.Cx \&\ \&
-.Ic =
-.Cx \&\ \&
-.Cx <
-.Va expr2
-.Cx >,
-.Cx \&\ \&
-.Va expr1
-.Cx >
-.Cx \&\ \&
+.It Xo
+.Aq Va expr1
+.Ic ==
+.Aq Va expr2 ,
+.Aq Va expr1
-.Cx \&\ \&
-.Cx <
-.Va expr2
-.Cx >
-.Cx
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.
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.
-.Tp Cx <
-.Va expr1
-.Cx >
-.Cx \&\ \&
-.Cx \&\ \&
-.Cx <
-.Va expr2
-.Cx >,
-.Cx \&\ \&
-.Va expr1
-.Cx >
-.Cx \&\ \&
+.Aq Va expr2 ,
+.Aq Va expr1
-.Cx \&\ \&
-.Cx <
-.Va expr2
-.Cx >,
-.Cx \&\ \&
-.Va expr1
-.Cx >
-.Cx \&\ \&
+.Aq Va expr2 ,
+.Aq Va expr1
-.Cx \&\ \&
-.Cx <
-.Va expr2
-.Cx >,
-.Cx
Less than, greater than, less than or equal to,
greater than or equal to. Both numeric and string values, with
automatic conversion as above.
Less than, greater than, less than or equal to,
greater than or equal to. Both numeric and string values, with
automatic conversion as above.
-.Tp Cx <
-.Va expr1
-.Cx >
-.Cx \&\ \&
-.Cx \&\ \&
-.Cx <
-.Va expr2
-.Cx >,
-.Cx \&\ \&
-.Va expr1
-.Cx >
-.Cx \&\ \&
+.Aq Va expr2 ,
+.Aq Va expr1
-.Cx \&\ \&
-.Cx <
-.Va expr2
-.Cx >
-.Cx
If both operands are numbers,
If both operands are numbers,
-.Cx <
-.Va expr1
-.Cx >
-.Cx
is bit
shifted left (or right) by
is bit
shifted left (or right) by
-.Cx <
-.Va expr2
-.Cx >
-.Cx
-.Cx <
-.Va expr1
-.Cx >
-.Cx
is
a string, then its first (or last)
is
a string, then its first (or last)
-.Cx <
-.Va expr2
-.Cx >
-.Cx
characters are
returns (if
characters are
returns (if
-.Cx <
-.Va expr2
-.Cx >
-.Cx
is also a string, then its length is used
in place of its value).
is also a string, then its length is used
in place of its value).
-.Tp Cx <
-.Va expr1
-.Cx >
-.Cx \&\ \&
-.Cx \&\ \&
-.Cx <
-.Va expr2
-.Cx >,
-.Cx \&\ \&
-.Va expr1
-.Cx >
-.Cx \&\ \&
+.Aq Va expr2 ,
+.Aq Va expr1
-.Cx \&\ \&
-.Cx <
-.Va expr2
-.Cx >
-.Cx
Addition and subtraction on numbers. For ``+'', if one
argument is a string, then the other is converted to a string,
and the result is the concatenation of the two strings.
Addition and subtraction on numbers. For ``+'', if one
argument is a string, then the other is converted to a string,
and the result is the concatenation of the two strings.
-.Tp Cx <
-.Va expr1
-.Cx >
-.Cx \&\ \&
-.Cx \&\ \&<
-.Va expr2
-.Cx >,
-.Cx \&\ \&<
-.Va expr1
-.Cx >
-.Cx \&\ \&
+.Aq Va expr2 ,
+.Aq Va expr1
-.Cx \&\ \&<
-.Va expr2
-.Cx >,\&\ \&<
-.Va expr1
-.Cx >,
-.Cx \&\ \&<
-.Va expr1
-.Cx >
-.Cx \&\ \&
+.Aq Va expr2 ,
+.Aq Va expr1
-.Cx \&\ \&<
-.Va expr2
-.Cx >
-.Cx
Multiplication, division, modulo. Numbers only.
Multiplication, division, modulo. Numbers only.
-.Tp Cx <
-.Va expr
-.Cx >,
-.Cx \&\ \&
-.Ic ~
-.Cx <
-.Va expr
-.Cx >,
-.Cx \&\ \&
-.Ic \&!
-.Cx <
-.Va expr
-.Cx >,
-.Cx \&\ \&
-.Ic \&$
-.Cx <
-.Va expr
-.Cx >,
-.Cx \&\ \&
-.Ic \&$?
-.Cx <
-.Va expr
-.Cx >
-.Cx
+.It Xo
+.Ic \- Ns Aq Va expr ,
+.Ic ~ Ns Aq Va expr ,
+.Ic \&! Ns Aq Va expr ,
+.Ic \&$ Ns Aq Va expr ,
+.Ic \&$? Ns Aq Va expr
+.Xc
The first three are unary minus, bitwise complement and logical complement
on numbers only. The operator, ``$'', takes
The first three are unary minus, bitwise complement and logical complement
on numbers only. The operator, ``$'', takes
-.Cx <
-.Va expr
-.Cx >
-.Cx
and returns
the value of the variable of that name. If
and returns
the value of the variable of that name. If
-.Cx <
-.Va expr
-.Cx >
-.Cx
is numeric
with value
.Ar n
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
is numeric
with value
.Ar n
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
-.Cx <
-.Va expr
-.Cx >,
-.Cx
and returns 1
if it exists or 0 otherwise.
and returns 1
if it exists or 0 otherwise.
-.Tp Cx <
-.Va expr
-.Cx >(<
-.Ar arglist
-.Cx >)
-.Cx
+.It Xo
+.Ao Va expr Ac Ns Pq Aq Ar arglist
+.Xc
-.Cx <
-.Va Expr
-.Cx >
-.Cx
must be a string that is the unique
prefix of the name of a builtin
.Nm window
function
or the full name of a user defined alias macro. In the case of a builtin
function,
must be a string that is the unique
prefix of the name of a builtin
.Nm window
function
or the full name of a user defined alias macro. In the case of a builtin
function,
-.Cx <
-.Ar arglist
-.Cx >
-.Cx
can be in one of two forms:
can be in one of two forms:
-.Dl <expr1>, <expr2>, ...
-.Dl argname1 = <expr1>, argname2 = <expr2>, ...
+.Bd -literal -offset indent
+<expr1>, <expr2>, ...
+argname1 = <expr1>, argname2 = <expr2>, ...
+.Ed
+.Pp
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
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
only and so must be used as statements. When a function or an alias is used
as a statement, the parenthesis surrounding
the argument list may be omitted. Aliases return no value.
only and so must be used as statements. When a function or an alias is used
as a statement, the parenthesis surrounding
the argument list may be omitted. Aliases return no value.
.Ss Builtin Functions
The arguments are listed by name in their natural
order. Optional arguments are in square brackets
.Ss Builtin Functions
The arguments are listed by name in their natural
order. Optional arguments are in square brackets
with
obvious meanings, or it can be a numeric expression,
in which case a non-zero value is true.
with
obvious meanings, or it can be a numeric expression,
in which case a non-zero value is true.
-.Tw Fl
-.Tp Cx Ic alias
-.Cx \&([<
-.Ar string
-.Cx ]>,
-.Cx \&\ \&[<
-.Ar string\-list
-.Cx >]\&)
-.Cx
+.Bl -tag -width Fl
+.It Xo
+.Ic alias Ns Po Bq Aq Ar string ,
+.Bq Aq Ar string\-list Pc
+.Xc
If no argument is given, all currently defined alias macros are
listed. Otherwise,
If no argument is given, all currently defined alias macros are
listed. Otherwise,
-.Cx <
-.Ar string
-.Cx >
-.Cx
is defined as an alias,
with expansion
is defined as an alias,
with expansion
-.Cx <
-.Ar string\-list
-.Cx > .
-.Cx
The previous definition of
The previous definition of
-.Cx <
-.Ar string
-.Cx >,
-.Cx
if any, is returned. Default for
if any, is returned. Default for
-.Cx <
-.Ar string\-list
-.Cx >
-.Cx
-.Tp Cx Ic close
-.Cx (<
-.Ar window\-list
-.Cx >)
-.Cx
+.It Ic close Ns Pq Aq Ar window\-list
Close the windows specified in
Close the windows specified in
-.Cx <
-.Ar window\-list
-.Cx >.
-.Cx
-.Cx <
-.Ar window\-list
-.Cx >
-.Cx
is the word
.Ar all ,
than all windows are closed. No value is returned.
is the word
.Ar all ,
than all windows are closed. No value is returned.
-.Tp Cx Ic cursormodes
-.Cx \&(
-.Op Ar modes
-.Cx \&)
-.Cx
+.It Ic cursormodes Ns Pq Bq Ar modes
Set the window cursor to
.Ar modes .
.Ar Modes
Set the window cursor to
.Ar modes .
.Ar Modes
.Li cursor($m_rev$m_blk)
sets the window cursors to blinking
reverse video.
.Li cursor($m_rev$m_blk)
sets the window cursors to blinking
reverse video.
-.Tp Cx Ic default_nline
-.Cx \&(
-.Op Ar nline
-.Cx \&)
-.Cx
+.It Ic default_nline Ns Pq Bq Ar nline
Set the default buffer size to
.Ar 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.
Set the default buffer size to
.Ar 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.
-.Tp Cx Ic default_shell
-.Cx \&([<
-.Ar string\-list
-.Cx >]\&)
-.Cx
+.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
-.Cx <
-.Ar string\-list
-.Cx >.
-.Cx
Returns
the first string in the old shell setting. Default is no change. Initially,
the default shell is taken from the environment variable
.Ev SHELL .
Returns
the first string in the old shell setting. Default is no change. Initially,
the default shell is taken from the environment variable
.Ev SHELL .
-.Tp Cx Ic default_smooth
-.Cx \&(
-.Op Ar flag
-.Cx \&)
-.Cx
+.It Ic default_smooth Ns Pq Bq Ar flag
Set the default value of the
.Ar smooth
argument
Set the default value of the
.Ar smooth
argument
as described above). Default is no change.
The old value (as a number) is returned.
The initial value is 1 (true).
as described above). Default is no change.
The old value (as a number) is returned.
The initial value is 1 (true).
-.Tp Cx Ic echo
-.Cx \&(
-.Op Ar window
-.Cx \&,\&\ \&[<
-.Ar string\-list
-.Cx >]\&)
-.Cx
+.It Xo
+.Ic echo Ns ( Op Ar window ,
+.Bq Aq Ar string\-list )
+.Xc
Write the list of strings,
Write the list of strings,
-.Cx <
-.Ar string-list
-.Cx >,
-.Cx
to
.Nm window ,
separated
to
.Nm window ,
separated
.Ic write
below). No value is returned. Default
is the current window.
.Ic write
below). No value is returned. Default
is the current window.
-.Tp Cx Ic escape
-.Cx \&(
-.Op Ar escapec
-.Cx \&)
-.Cx
+.It Ic escape Ns Pq Bq Ar escapec
Set the escape character to
.Ar escape-char .
Returns the old
Set the escape character to
.Ar escape-char .
Returns the old
in the form
.Fl ^X ,
meaning
in the form
.Fl ^X ,
meaning
-Cx control\-
-.Ar X
-.Cx .
-.Cx
-.Tp Cx Ic foreground
-.Cx \&(
-.Op Ar window
-.Cx \&,
-.Op Ar flag
-.Cx \&)
-.Cx
+.No control\- Ns Ar X .
+.It Xo
+.Ic foreground Ns ( Bq Ar window ,
+.Bq Ar flag )
+.Xc
Move
.Nm window
in or out of foreground.
Move
.Nm window
in or out of foreground.
default for
.Ar flag
is no change.
default for
.Ar flag
is no change.
-.Tp Cx Ic label
-.Cx \&(
-.Op Ar window
-.Cx \&,
-.Op Ar label
-.Cx \&)
-.Cx
+.It Xo
+.Ic label Ns ( Bq Ar window ,
+.Bq Ar label )
+.Xc
Set the label of
.Nm window
to
Set the label of
.Nm window
to
.Ar label
is no change. To turn
off a label, set it to an empty string ("").
.Ar label
is no change. To turn
off a label, set it to an empty string ("").
-.Tp Cx Ic list
-.Cx \&( \&)
-.Cx
No arguments. List the identifiers and labels of all windows. No
value is returned.
No arguments. List the identifiers and labels of all windows. No
value is returned.
-.Tp Cx Ic select
-.Cx \&(
-.Op Ar window
-.Cx \&)
-.Cx
+.It Ic select Ns Pq Bq Ar window
Make
.Nm window
the current window. The previous current window
is returned. Default is no change.
Make
.Nm window
the current window. The previous current window
is returned. Default is no change.
-.Tp Cx Ic source
-.Cx \&(
-.Ar filename
-.Cx \&)
-.Cx
+.It Ic source Ns Pq Ar filename
Read and execute the long commands in
.Ar filename .
Read and execute the long commands in
.Ar filename .
-Returns -1 if the file cannot be read, 0 otherwise.
-.Tp Cx Ic terse
-.Cx \&(
-.Op flag
-.Cx \&)
-.Cx
+Returns \-1 if the file cannot be read, 0 otherwise.
+.It Ic terse Ns Pq Bq flag
Set terse mode to
.Ar flag .
In terse mode, the command window
Set terse mode to
.Ar flag .
In terse mode, the command window
.Ar foreground
above. Returns the old terse flag.
Default is no change.
.Ar foreground
above. Returns the old terse flag.
Default is no change.
-.Tp Cx Ic unalias
-.Cx \&(
-.Ar alias
-.Cx \&)
-.Cx
+.It Ic unalias Ns Pq Ar alias
Undefine
.Ar alias .
Returns -1 if
.Ar alias
does not exist,
0 otherwise.
Undefine
.Ar alias .
Returns -1 if
.Ar alias
does not exist,
0 otherwise.
-.Tp Cx Ic unset
-.Cx \&(
-.Ar variable
-.Cx \&)
-.Cx
+.It Ic unset Ns Pq Ar variable
Undefine
.Ar variable .
Returns -1 if
.Ar variable
does not exist,
0 otherwise.
Undefine
.Ar variable .
Returns -1 if
.Ar variable
does not exist,
0 otherwise.
-.Tp Cx Ic variables
-.Cx \&( \&)
-.Cx
No arguments. List all variables. No value is returned.
No arguments. List all variables. No value is returned.
-.Tp Cx Ic window
-.Cx \&(
-.Op Ar row
-.Cx \&,
-.Cx \&\ \&
-.Op Ar column
-.Cx \&,
-.Cx \&\ \&
-.Op Ar nrow
-.Cx \&,
-.Cx \&\ \&
-.Op Ar ncol
-.Cx \&,
-.Cx \&\ \&
-.Op Ar nline
-.Cx \&,
-.Cx \&\ \&
-.Op Ar label
-.Cx \&,
-.Cx \&\ \&
-.Cx Op Ar pty
-.Cx \&,
-.Cx
-.Op Ar frame
-.Cx \&,
-.Cx \&\ \&
-.Op Ar mapnl
-.Cx \&,
-.Cx \&\ \&
-.Op Ar keepopen
-.Cx \&,
-.Cx \&\ \&
-.Op Ar smooth
-.Cx \&,
-.Cx \&\ \&
-.Op Ar shell
-.Cx \&).
-.Cx
+.It Xo
+.Ic window Ns ( Bq Ar row ,
+.Bq Ar column ,
+.Bq Ar nrow ,
+.Bq Ar ncol ,
+.Bq Ar nline ,
+.Bq Ar label ,
+.Bq Ar pty ,
+.Bq Ar frame ,
+.Bq Ar mapnl ,
+.Bq Ar keepopen ,
+.Bq Ar smooth ,
+.Bq Ar shell ) .
+.Xc
Open a window with upper left corner at
.Ar row ,
.Ar column
Open a window with upper left corner at
.Ar row ,
.Ar column
.Ar default_shell ,
see above). The created window's identifier
is returned as a number.
.Ar default_shell ,
see above). The created window's identifier
is returned as a number.
-.Tp Cx Ic write
-.Cx \&(
-.Op Ar window
-.Cx \&,\&\ \&[<
-.Ar string\-list
-.Cx >]\&)
-.Cx
+.It Xo
+.Ic write Ns ( Bq Ar window ,
+.Bq Aq Ar string\-list )
+.Xc
Send the list of strings,
Send the list of strings,
-.Cx <
-.Ar string-list
-.Cx >,
-.Cx
to
.Nm 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.
to
.Nm 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.
.Ss Predefined Variables
These variables are for information only. Redefining them does
not affect the internal operation of
.Nm window .
.Ss Predefined Variables
These variables are for information only. Redefining them does
not affect the internal operation of
.Nm window .
+.Bl -tag -width modes
+.It Ar baud
The baud rate as a number between 50 and 38400.
The baud rate as a number between 50 and 38400.
The display modes (reverse video, underline, blinking, graphics)
supported by the physical terminal. The value of
.Ar modes
The display modes (reverse video, underline, blinking, graphics)
supported by the physical terminal. The value of
.Ar modes
in setting the window cursors' modes (see
.Ar cursormodes
above).
in setting the window cursors' modes (see
.Ar cursormodes
above).
The graphics mode bit (not very useful).
The graphics mode bit (not very useful).
The reverse video mode bit.
The reverse video mode bit.
The number of columns on the physical screen.
The number of columns on the physical screen.
The number of rows on the physical screen.
The number of rows on the physical screen.
The terminal type. The standard name, found in the second name
field of the terminal's
.Ev TERMCAP
The terminal type. The standard name, found in the second name
field of the terminal's
.Ev TERMCAP
.Ev TERMCAP ,
.Ev WINDOW_ID .
.Sh FILES
.Ev TERMCAP ,
.Ev WINDOW_ID .
.Sh FILES
-.Dw /dev/[pt]ty[pq]?
-.Di L
-.Dp Pa ~/.windowrc
+.Bl -tag -width /dev/[pt]ty[pq]? -compact
+.It Pa ~/.windowrc
-.Dp Cx Pa /dev/
-.Op Pa pt
-.Cx ty
-.Op Pa pq
-.Cx ?
-.Cx
+command appeared in
+.Bx 4.3 .
.Sh DIAGNOSTICS
Should be self explanatory.
.Sh DIAGNOSTICS
Should be self explanatory.