BSD 4_3_Reno release
[unix-history] / usr / src / usr.bin / telnet / telnet.1
index 297ff1b..ecc2c84 100644 (file)
@@ -1,16 +1,28 @@
 .\" Copyright (c) 1983, 1990 The Regents of the University of California.
 .\" All rights reserved.
 .\"
 .\" Copyright (c) 1983, 1990 The Regents of the University of California.
 .\" All rights reserved.
 .\"
-.\" %sccs.include.redist.man%
+.\" Redistribution and use in source and binary forms are permitted provided
+.\" that: (1) source distributions retain this entire copyright notice and
+.\" comment, and (2) distributions including binaries display the following
+.\" acknowledgement:  ``This product includes software developed by the
+.\" University of California, Berkeley and its contributors'' in the
+.\" documentation or other materials provided with the distribution and in
+.\" all advertising materials mentioning features or use of this software.
+.\" Neither the name of the University nor the names of its contributors may
+.\" be used to endorse or promote products derived from this software without
+.\" specific prior written permission.
+.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\"
-.\"     @(#)telnet.1   6.13 (Berkeley) %G%
+.\"     @(#)telnet.1   6.13 (Berkeley) 7/28/90
 .\"
 .\"
-.Dd 
+.Dd July 28, 1990
 .Dt TELNET 1
 .Os BSD 4.2
 .Sh NAME
 .Nm telnet
 .Dt TELNET 1
 .Os BSD 4.2
 .Sh NAME
 .Nm telnet
-.Nd user interface to the 
+.Nd User interface to the 
 .Li TELNET
 protocol
 .Sh SYNOPSIS
 .Li TELNET
 protocol
 .Sh SYNOPSIS
@@ -18,6 +30,9 @@ protocol
 .Op Fl d
 .Op Fl a
 .Op Fl n Ar tracefile
 .Op Fl d
 .Op Fl a
 .Op Fl n Ar tracefile
+.Op Fl e Ar escapechar
+.Ob
+.Op Fl l Ar user
 .Ar host
 .Op port
 .Oe
 .Ar host
 .Op port
 .Oe
@@ -65,6 +80,33 @@ for recording trace information.
 See the
 .Ic set tracefile
 command below.
 See the
 .Ic set tracefile
 command below.
+.Tp Cx Fl l
+.Cx \&\ \&
+.Ar user
+.Cx
+When connecting to the remote system, if the remote system
+understands the ENVIRON option, then
+.Ar user
+will be sent to the remote system as the value for the variable USER.
+This option implies the
+.Fl a
+option.
+This option may also be used with the
+.Ic open
+command.
+.Tp Cx Fl e
+.Cx \&\ \&
+.Ar escape char
+.Cx
+Sets the initial
+.Nm
+.B telnet
+escape character to
+.Ar escape char.
+If
+.Ar escape char
+is ommitted, then
+there will be no escape character.
 .Tp Ar host
 Indicates the official name, an alias, or the Internet address
 of a remote host.
 .Tp Ar host
 Indicates the official name, an alias, or the Internet address
 of a remote host.
@@ -167,6 +209,7 @@ Only enough of each command to uniquely identify it need be typed
 .Ic toggle  ,
 .Ic unset ,
 .Ic slc  ,
 .Ic toggle  ,
 .Ic unset ,
 .Ic slc  ,
+.Ic environ ,
 and
 .Ic display
 commands).
 and
 .Ic display
 commands).
@@ -233,6 +276,30 @@ option.
 This requires that the 
 .Li LINEMODE
 option be enabled.
 This requires that the 
 .Li LINEMODE
 option be enabled.
+.Tp Cx Ic softtabs
+.Cx \&\ \&
+.Pq Ic \-softtabs
+.Cx
+Attempt to enable (disable) the 
+.Li SOFT_TAB
+mode of the 
+.Li LINEMODE
+option.
+This requires that the 
+.Li LINEMODE
+option be enabled.
+.Tp Cx Ic litecho
+.Cx \&\ \&
+.Pq Ic \-litecho
+.Cx
+Attempt to enable (disable) the 
+.Li LIT_ECHO
+mode of the 
+.Li LINEMODE
+option.
+This requires that the 
+.Li LINEMODE
+option be enabled.
 .Tp Ic \&?
 Prints out help information for the
 .Ic mode
 .Tp Ic \&?
 Prints out help information for the
 .Ic mode
@@ -243,6 +310,11 @@ command.
 .Ar host
 .Cx \&\ \&
 .Cx [
 .Ar host
 .Cx \&\ \&
 .Cx [
+.Op Fl l
+.Cx \&\ \&
+.Ar user
+.Cx ]
+.Cx [
 .Op Fl
 .Cx \&\ \&
 .Ar port
 .Op Fl
 .Cx \&\ \&
 .Ar port
@@ -259,6 +331,12 @@ The host specification may be either a host name (see
 .Xr hosts  5  )
 or an Internet address specified in the \*(Lqdot notation\*(Rq (see
 .Xr inet 3 ) .
 .Xr hosts  5  )
 or an Internet address specified in the \*(Lqdot notation\*(Rq (see
 .Xr inet 3 ) .
+The
+.Op Fl l
+option may be used to specify the user name
+to be passed to the remote system via the
+.Li ENVIRON
+option.
 When connecting to a non-standard port,
 .Nm telnet
 omits any automatic initiation of
 When connecting to a non-standard port,
 .Nm telnet
 omits any automatic initiation of
@@ -648,6 +726,11 @@ The initial value for the worderase character is taken to be
 the terminal's
 .Ic worderase
 character.
 the terminal's
 .Ic worderase
 character.
+.Tp Ic \&?
+Displays the legal
+.Ic set
+.Pq Ic unset
+commands.
 .Tp
 .Tp Cx Ic slc
 .Cx \&\ \&
 .Tp
 .Tp Cx Ic slc
 .Cx \&\ \&
@@ -690,16 +773,81 @@ Verify the current settings for the current special characters.
 The remote side is requested to send all the current special
 character settings, and if there are any discrepencies with
 the local side, the local side will switch to the remote value.
 The remote side is requested to send all the current special
 character settings, and if there are any discrepencies with
 the local side, the local side will switch to the remote value.
-.Ic Ic \&?
+.Tp Ic \&?
 Prints out help information for the
 .Ic slc
 command.
 .Tp
 Prints out help information for the
 .Ic slc
 command.
 .Tp
+.Tp Cx Ic environ
+.Cx \&\ \&
+.Ar arguments...
+.Cx
+The
+.Ic environ
+command is used to manipulate the
+the variables that my be sent through the
+.Li TELNET ENVIRON
+option.
+The initial set of variables is taken from the users
+environment, with only the
+.Ev DISPLAY
+and
+.Ev PRINTER
+variables being exported by default.
+The
+.Ev USER
+variable is also exported if the
+.Fl a
+or
+.Fl l
+options are used.
+.br
+Valid arguments for the \fBenviron\fP command are:
+.Tw Fl
+.Tp Cx Ic define
+.Cx \&\ \&
+.Ar variable value
+.Cx
+Define the variable
+.Ar variable
+to have a value of
+.Ar value.
+Any variables defined by this command are automatically exported.
+The
+.Ar value
+may be enclosed in single or double quotes so
+that tabs and spaces may be included.
+.Tp Cx Ic undefine
+.Cx \&\ \&
+.Ar variable
+.Cx
+Remove
+.Ar variable
+from the list of environment variables.
+.Tp Cx Ic export
+.Cx \&\ \&
+.Ar variable
+.Cx
+Mark the variable
+.Ar variable
+to be exported to the remote side.
+.Tp Cx Ic unexport
+.Cx \&\ \&
+.Ar variable
+.Cx
+Mark the variable
+.Ar variable
+to not be exported unless
+explicitly asked for by the remote side.
+.Tp Ic list
+List the current set of environment variables.
+Those marked with a \fB*\fR will be sent automatically,
+other variables will only be sent if explicitly requested.
 .Tp Ic \&?
 .Tp Ic \&?
-Displays the legal
-.Ic set
-.Pq Ic unset
-commands.
+Prints out help information for the
+.Ic environ
+command.
+.Tp
 .Tp Cx Ic toggle
 .Cx \&\ \&
 .Ar arguments ...
 .Tp Cx Ic toggle
 .Cx \&\ \&
 .Ar arguments ...
@@ -814,7 +962,9 @@ If this is
 TRUE,
 then the
 .Ic flush  ,
 TRUE,
 then the
 .Ic flush  ,
+.Ic interrupt ,
 .Ic quit  ,
 .Ic quit  ,
+.Ic erase ,
 and
 .Ic kill
 characters (see
 and
 .Ic kill
 characters (see
@@ -824,7 +974,9 @@ above) are recognized locally, and transformed into (hopefully) appropriate
 control sequences
 (respectively
 .Ic ao  ,
 control sequences
 (respectively
 .Ic ao  ,
+.Ic ip ,
 .Ic brk  ,
 .Ic brk  ,
+.Ic ec ,
 and
 .Ic el  ;
 see
 and
 .Ic el  ;
 see
@@ -848,6 +1000,7 @@ and
 .B suspend
 are sent as
 .Ic eof and
 .B suspend
 are sent as
 .Ic eof and
+.Ic susp ,
 see
 .Ic send
 above).
 see
 .Ic send
 above).
@@ -909,12 +1062,17 @@ If a command is specified,
 will print the help information for just that command.
 .Sh ENVIRONMENT
 .Nm Telnet
 will print the help information for just that command.
 .Sh ENVIRONMENT
 .Nm Telnet
-uses the
+uses at least the
 .Ev HOME ,
 .Ev HOME ,
-.Ev SHELL
+.Ev SHELL ,
+.Ev DISPLAY ,
 and
 .Ev TERM
 environent variables.
 and
 .Ev TERM
 environent variables.
+Other envirnoment variables may be propogated
+to the other side via the
+.Li TELNET ENVIRON
+option.
 .Sh FILES
 .Dw ~/.telnetrc
 .Di L
 .Sh FILES
 .Dw ~/.telnetrc
 .Di L