components/tcsh/manpages/tcsh.1
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Thu, 17 Feb 2011 14:05:50 -0800
changeset 94 e2364cad23ff
child 181 87e11e685b1f
permissions -rw-r--r--
7019782 move tcsh to userland
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
94
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     1
'\" t
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     2
.\" Copyright (c) 1980, 1990, 1993
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     3
.\"	The Regents of the University of California.  All rights reserved.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     4
.\"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     5
.\" Redistribution and use in source and binary forms, with or without
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     6
.\" modification, are permitted provided that the following conditions
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     7
.\" are met:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     8
.\" 1. Redistributions of source code must retain the above copyright
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     9
.\"    notice, this list of conditions and the following disclaimer.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    10
.\" 2. Redistributions in binary form must reproduce the above copyright
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    11
.\"    notice, this list of conditions and the following disclaimer in the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    12
.\"    documentation and/or other materials provided with the distribution.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    13
.\" 3. Neither the name of the University nor the names of its contributors
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    14
.\"    may be used to endorse or promote products derived from this software
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    15
.\"    without specific prior written permission.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    16
.\"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    17
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    18
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    19
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    20
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    21
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    22
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    23
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    24
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    25
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    26
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    27
.\" SUCH DAMAGE.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    28
.\" 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    29
.\" Style notes for the tcsh man page:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    30
.\" 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    31
.\" - Tags in lists are bold, except in the FILES section where they are
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    32
.\"   italic.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    33
.\" 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    34
.\" - References are bold for section headings and environment and shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    35
.\"   variables and italic for commands (externals, builtins, aliases, and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    36
.\"   editor commands) and arguments to commands.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    37
.\" 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    38
.\" - Be careful with the .B and .I macros: they handle only a limited number
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    39
.\"   of words. Work around this with \fB and \fI, but only if absolutely
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    40
.\"   necessary, because tcsh.man2html uses .B/.I to find name anchors.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    41
.\" 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    42
.\" - Indent in multiples of 4, usually 8.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    43
.\" 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    44
.\" - Use `', not '' or "", except of course in shell syntax examples.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    45
.\"   '' at the beginning of a line will vanish!
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    46
.\" 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    47
.\" - Use \-, not -.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    48
.\" 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    49
.\" - Include the tilde when naming dot files. `~/.login', not `.login'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    50
.\" 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    51
.\" - Refer to external commands in man page format, e.g., `csh(1)'. However,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    52
.\"   tcsh is `tcsh', not `tcsh(1)', because this is the tcsh man page (and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    53
.\"   see the next note anyway).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    54
.\" 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    55
.\" - Say `the shell', not `tcsh', unless distinguishing between tcsh and csh.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    56
.\" 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    57
.\" - Say `shell variable'/`environment variable' instead of `variable'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    58
.\"   and `builtin command'/`editor command' instead of `builtin' or `command'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    59
.\"   unless the distinction is absolutely clear from context.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    60
.\" 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    61
.\" - Use the simple present tense. `The shell uses', not `The shell will use'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    62
.\" 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    63
.\" - IMPORTANT: Cross-reference as much as possible. Commands, variables,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    64
.\"   etc. in the reference section should be mentioned in the appropriate
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    65
.\"   descriptive section, or at least in the reference-section description
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    66
.\"   of another command (or whatever) which is mentioned in a description
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    67
.\"   section. Remember to note OS-specific things in "OS variant support",
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    68
.\"   new features in NEW FEATURES and referenced external commands in SEE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    69
.\"   ALSO.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    70
.\" 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    71
.\" - tcsh.man2html depends heavily on the specific nroff commands used in the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    72
.\"   man page when the script was written. Please stick closely to the style
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    73
.\"   used here if you can. In particular, please don't use nroff commands
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    74
.\"   which aren't already used herein.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    75
.\" 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    76
.\" modified to reference existing Solaris man pages, to add the Solaris
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    77
.\" stability classification, and to add a note about source availability.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    78
.\"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    79
.TH TCSH 1 "10 July 2009" "Astron 6.17.00"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    80
.SH NAME
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    81
tcsh \- C shell with file name completion and command line editing
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    82
.SH SYNOPSIS
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    83
.B tcsh \fR[\fB\-bcdefFimnqstvVxX\fR] [\fB\-Dname\fR[\fB=value\fR]] [arg ...]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    84
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    85
.B tcsh \-l
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    86
.SH DESCRIPTION
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    87
\fItcsh\fR is an enhanced but completely compatible version of the Berkeley
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    88
UNIX C shell, \fIcsh\fR(1).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    89
It is a command language interpreter usable both as an interactive login
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    90
shell and a shell script command processor.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    91
It includes a command-line editor (see \fBThe command-line editor\fR),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    92
programmable word completion (see \fBCompletion and listing\fR),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    93
spelling correction (see \fBSpelling correction\fR),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    94
a history mechanism (see \fBHistory substitution\fR),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    95
job control (see \fBJobs\fR)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    96
and a C-like syntax.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    97
The \fBNEW FEATURES\fR section describes major enhancements of \fItcsh\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    98
over \fIcsh\fR(1).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    99
Throughout this manual, features of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   100
\fItcsh\fR not found in most \fIcsh\fR(1) implementations
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   101
(specifically, the 4.4BSD \fIcsh\fR)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   102
are labeled with `(+)', and features which are present in \fIcsh\fR(1)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   103
but not usually documented are labeled with `(u)'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   104
.SS "Argument list processing"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   105
If the first argument (argument 0) to the shell is `\-' then it is a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   106
login shell.  A login shell can be also specified by invoking the shell with
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   107
the \fB\-l\fR flag as the only argument.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   108
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   109
The rest of the flag arguments are interpreted as follows:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   110
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   111
.B \-b
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   112
Forces a ``break'' from option processing, causing any
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   113
further shell arguments to be treated as non-option arguments.  The remaining
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   114
arguments will not be interpreted as shell options.  This may be used to pass
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   115
options to a shell script without confusion or possible subterfuge.  The shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   116
will not run a set-user ID script without this option.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   117
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   118
.B \-c
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   119
Commands are read from the following argument (which must be present, and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   120
must be a single argument),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   121
stored in the \fBcommand\fR shell variable for reference, and executed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   122
Any remaining arguments are placed in the \fBargv\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   123
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   124
.B \-d
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   125
The shell loads the directory stack from \fI~/.cshdirs\fR as described under
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   126
\fBStartup and shutdown\fR, whether or not it is a login shell. (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   127
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   128
.B \-D\fIname\fR[=\fIvalue\fR]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   129
Sets the environment variable \fIname\fR to \fIvalue\fR. (Domain/OS only) (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   130
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   131
.B \-e
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   132
The shell exits if any invoked command terminates abnormally or
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   133
yields a non-zero exit status.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   134
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   135
.B \-f
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   136
The shell does not load any resource or startup files, or perform any 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   137
command hashing, and thus starts faster.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   138
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   139
.B \-F
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   140
The shell uses \fIfork\fR(2) instead of \fIvfork\fR(2) to spawn processes. (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   141
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   142
.B \-i
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   143
The shell is interactive and prompts for its top-level input, even if
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   144
it appears to not be a terminal.  Shells are interactive without this option if
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   145
their inputs and outputs are terminals.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   146
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   147
.B \-l
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   148
The shell is a login shell.  Applicable only if \fB\-l\fR is the only
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   149
flag specified.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   150
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   151
.B \-m
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   152
The shell loads \fI~/.tcshrc\fR even if it does not belong to the effective
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   153
user.  Newer versions of \fIsu\fR(1M) can pass \fB\-m\fR to the shell. (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   154
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   155
.B \-n
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   156
The shell parses commands but does not execute them.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   157
This aids in debugging shell scripts.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   158
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   159
.B \-q
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   160
The shell accepts SIGQUIT (see \fBSignal handling\fR) and behaves when
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   161
it is used under a debugger.  Job control is disabled. (u)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   162
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   163
.B \-s
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   164
Command input is taken from the standard input.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   165
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   166
.B \-t
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   167
The shell reads and executes a single line of input.  A `\\' may be used to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   168
escape the newline at the end of this line and continue onto another line.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   169
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   170
.B \-v
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   171
Sets the \fBverbose\fR shell variable, so that
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   172
command input is echoed after history substitution.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   173
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   174
.B \-x
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   175
Sets the \fBecho\fR shell variable, so that commands are echoed
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   176
immediately before execution.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   177
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   178
.B \-V
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   179
Sets the \fBverbose\fR shell variable even before executing \fI~/.tcshrc\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   180
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   181
.B \-X
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   182
Is to \fB\-x\fR as \fB\-V\fR is to \fB\-v\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   183
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   184
.B \-\-help
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   185
Print a help message on the standard output and exit. (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   186
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   187
.B \-\-version
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   188
Print the version/platform/compilation options on the standard output and exit.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   189
This information is also contained in the \fBversion\fR shell variable. (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   190
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   191
After processing of flag arguments, if arguments remain but none of the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   192
\fB\-c\fR, \fB\-i\fR, \fB\-s\fR, or \fB\-t\fR options were given, the first
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   193
argument is taken as the name of a file of commands, or ``script'', to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   194
be executed.  The shell opens this file and saves its name for possible
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   195
resubstitution by `$0'.  Because many systems use either the standard
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   196
version 6 or version 7 shells whose shell scripts are not compatible
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   197
with this shell, the shell uses such a `standard' shell to execute a script
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   198
whose first character is not a `#', i.e., that does not start with a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   199
comment.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   200
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   201
Remaining arguments are placed in the \fBargv\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   202
.SS "Startup and shutdown"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   203
A login shell begins by executing commands from the system files
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   204
\fI/etc/.cshrc\fR and \fI/etc/.login\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   205
It then executes commands from files in the user's \fBhome\fR directory:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   206
first \fI~/.tcshrc\fR (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   207
or, if \fI~/.tcshrc\fR is not found, \fI~/.cshrc\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   208
then \fI~/.history\fR (or the value of the \fBhistfile\fR shell variable),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   209
then \fI~/.login\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   210
and finally \fI~/.cshdirs\fR (or the value of the \fBdirsfile\fR shell variable) (+).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   211
The shell may read \fI/etc/csh.login\fR before instead of after
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   212
\fI/etc/.cshrc\fR, and \fI~/.login\fR before instead of after
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   213
\fI~/.tcshrc\fR or \fI~/.cshrc\fR and \fI~/.history\fR, if so compiled;
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   214
see the \fBversion\fR shell variable. (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   215
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   216
Non-login shells read only \fI/etc/.cshrc\fR and \fI~/.tcshrc\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   217
or \fI~/.cshrc\fR on startup.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   218
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   219
For examples of startup files, please consult
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   220
\fIhttp://tcshrc.sourceforge.net\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   221
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   222
Commands like \fIstty\fR(1) and \fItset\fR(1B),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   223
which need be run only once per login, usually go in one's \fI~/.login\fR file.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   224
Users who need to use the same set of files with both \fIcsh\fR(1) and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   225
\fItcsh\fR can have only a \fI~/.cshrc\fR which checks for the existence of the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   226
\fBtcsh\fR shell variable (q.v.) before using \fItcsh\fR-specific commands,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   227
or can have both a \fI~/.cshrc\fR and a \fI~/.tcshrc\fR which \fIsource\fRs
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   228
(see the builtin command) \fI~/.cshrc\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   229
The rest of this manual uses `\fI~/.tcshrc\fR' to mean `\fI~/.tcshrc\fR or,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   230
if \fI~/.tcshrc\fR is not found, \fI~/.cshrc\fR'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   231
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   232
In the normal case, the shell begins reading commands from the terminal,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   233
prompting with `> '.  (Processing of arguments and the use of the shell to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   234
process files containing command scripts are described later.)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   235
The shell repeatedly reads a line of command input, breaks it into words,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   236
places it on the command history list, parses it and executes each command
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   237
in the line.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   238
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   239
One can log out by typing `^D' on an empty line, `logout' or `login' or
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   240
via the shell's autologout mechanism (see the \fBautologout\fR shell variable).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   241
When a login shell terminates it sets the \fBlogout\fR shell variable to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   242
`normal' or `automatic' as appropriate, then
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   243
executes commands from the files
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   244
\fI/etc/csh.logout\fR and \fI~/.logout\fR.  The shell may drop DTR on logout
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   245
if so compiled; see the \fBversion\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   246
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   247
The names of the system login and logout files vary from system to system for
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   248
compatibility with different \fIcsh\fR(1) variants; see \fBFILES\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   249
.SS Editing
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   250
We first describe \fBThe command-line editor\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   251
The \fBCompletion and listing\fR and \fBSpelling correction\fR sections
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   252
describe two sets of functionality that are implemented as editor commands
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   253
but which deserve their own treatment.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   254
Finally, \fBEditor commands\fR lists and describes
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   255
the editor commands specific to the shell and their default bindings.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   256
.SS "The command-line editor (+)"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   257
Command-line input can be edited using key sequences much like those used in
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   258
GNU Emacs or \fIvi\fR(1).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   259
The editor is active only when the \fBedit\fR shell variable is set, which
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   260
it is by default in interactive shells.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   261
The \fIbindkey\fR builtin can display and change key bindings.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   262
Emacs-style key bindings are used by default
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   263
(unless the shell was compiled otherwise; see the \fBversion\fR shell variable),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   264
but \fIbindkey\fR can change the key bindings to \fIvi\fR-style bindings en masse.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   265
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   266
The shell always binds the arrow keys (as defined in the \fBTERMCAP\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   267
environment variable) to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   268
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   269
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   270
.RS +4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   271
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   272
down
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   273
\fIdown-history\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   274
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   275
up
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   276
\fIup-history\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   277
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   278
left
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   279
\fIbackward-char\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   280
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   281
right
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   282
\fIforward-char\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   283
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   284
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   285
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   286
unless doing so would alter another single-character binding.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   287
One can set the arrow key escape sequences to the empty string with \fIsettc\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   288
to prevent these bindings.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   289
The ANSI/VT100 sequences for arrow keys are always bound.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   290
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   291
Other key bindings are, for the most part, what Emacs and \fIvi\fR(1)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   292
users would expect and can easily be displayed by \fIbindkey\fR, so there
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   293
is no need to list them here.  Likewise, \fIbindkey\fR can list the editor
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   294
commands with a short description of each.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   295
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   296
Note that editor commands do not have the same notion of a ``word'' as does the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   297
shell.  The editor delimits words with any non-alphanumeric characters not in
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   298
the shell variable \fBwordchars\fR, while the shell recognizes only whitespace
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   299
and some of the characters with special meanings to it, listed under
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   300
\fBLexical structure\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   301
.SS "Completion and listing (+)"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   302
The shell is often able to complete words when given a unique abbreviation.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   303
Type part of a word (for example `ls /usr/lost') and hit the tab key to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   304
run the \fIcomplete-word\fR editor command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   305
The shell completes the filename `/usr/lost' to `/usr/lost+found/',
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   306
replacing the incomplete word with the complete word in the input buffer.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   307
(Note the terminal `/'; completion adds a `/' to the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   308
end of completed directories and a space to the end of other completed words,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   309
to speed typing and provide a visual indicator of successful completion.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   310
The \fBaddsuffix\fR shell variable can be unset to prevent this.)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   311
If no match is found (perhaps `/usr/lost+found' doesn't exist),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   312
the terminal bell rings.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   313
If the word is already complete (perhaps there is a `/usr/lost' on your
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   314
system, or perhaps you were thinking too far ahead and typed the whole thing)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   315
a `/' or space is added to the end if it isn't already there.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   316
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   317
Completion works anywhere in the line, not at just the end; completed
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   318
text pushes the rest of the line to the right.  Completion in the middle of a word
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   319
often results in leftover characters to the right of the cursor that need
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   320
to be deleted.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   321
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   322
Commands and variables can be completed in much the same way.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   323
For example, typing `em[tab]' would complete `em' to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   324
`emacs' if \fIemacs\fR were the only command on your system beginning with `em'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   325
Completion can find a command in any directory in \fBpath\fR or if
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   326
given a full pathname.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   327
Typing `echo $ar[tab]' would complete `$ar' to `$argv'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   328
if no other variable began with `ar'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   329
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   330
The shell parses the input buffer to determine whether the word you want to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   331
complete should be completed as a filename, command or variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   332
The first word in the buffer and the first word following
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   333
`;', `|', `|&', `&&' or `||' is considered to be a command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   334
A word beginning with `$' is considered to be a variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   335
Anything else is a filename.  An empty line is `completed' as a filename.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   336
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   337
You can list the possible completions of a word at any time by typing `^D'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   338
to run the \fIdelete-char-or-list-or-eof\fR editor command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   339
The shell lists the possible completions using the \fIls\-F\fR builtin (q.v.)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   340
and reprints the prompt and unfinished command line, for example:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   341
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   342
> ls /usr/l[^D]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   343
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   344
lbin/       lib/        local/      lost+found/
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   345
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   346
> ls /usr/l
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   347
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   348
If the \fBautolist\fR shell variable is set, the shell lists the remaining
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   349
choices (if any) whenever completion fails:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   350
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   351
> set autolist
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   352
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   353
> nm /usr/lib/libt[tab]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   354
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   355
libtermcap.a@ libtermlib.a@
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   356
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   357
> nm /usr/lib/libterm
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   358
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   359
If \fBautolist\fR is set to `ambiguous', choices are listed only when
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   360
completion fails and adds no new characters to the word being completed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   361
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   362
A filename to be completed can contain variables, your own or others' home
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   363
directories abbreviated with `~' (see \fBFilename substitution\fR) and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   364
directory stack entries abbreviated with `='
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   365
(see \fBDirectory stack substitution\fR).  For example,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   366
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   367
> ls ~k[^D]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   368
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   369
kahn    kas     kellogg
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   370
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   371
> ls ~ke[tab]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   372
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   373
> ls ~kellogg/
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   374
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   375
or
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   376
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   377
> set local = /usr/local
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   378
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   379
> ls $lo[tab]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   380
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   381
> ls $local/[^D]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   382
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   383
bin/ etc/ lib/ man/ src/
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   384
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   385
> ls $local/
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   386
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   387
Note that variables can also be expanded explicitly with the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   388
\fIexpand-variables\fR editor command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   389
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   390
\fIdelete-char-or-list-or-eof\fR lists at only the end of the line;
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   391
in the middle of a line it deletes the character under the cursor and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   392
on an empty line it logs one out or, if \fBignoreeof\fR is set, does nothing.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   393
`M-^D', bound to the editor command \fIlist-choices\fR, lists completion
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   394
possibilities anywhere on a line, and \fIlist-choices\fR (or any one of the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   395
related editor commands that do or don't delete, list and/or log out,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   396
listed under \fIdelete-char-or-list-or-eof\fR) can be bound to `^D' with
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   397
the \fIbindkey\fR builtin command if so desired.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   398
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   399
The \fIcomplete-word-fwd\fR and \fIcomplete-word-back\fR editor commands
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   400
(not bound to any keys by default) can be used to cycle up and down through
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   401
the list of possible completions, replacing the current word with the next or
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   402
previous word in the list.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   403
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   404
The shell variable \fBfignore\fR can be set to a list of suffixes to be
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   405
ignored by completion.  Consider the following:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   406
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   407
> ls
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   408
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   409
Makefile        condiments.h~   main.o          side.c
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   410
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   411
README          main.c          meal            side.o
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   412
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   413
condiments.h    main.c~
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   414
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   415
> set fignore = (.o \\~)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   416
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   417
> emacs ma[^D]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   418
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   419
main.c   main.c~  main.o
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   420
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   421
> emacs ma[tab]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   422
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   423
> emacs main.c
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   424
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   425
`main.c~' and `main.o' are ignored by completion (but not listing),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   426
because they end in suffixes in \fBfignore\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   427
Note that a `\\' was needed in front of `~' to prevent it from being
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   428
expanded to \fBhome\fR as described under \fBFilename substitution\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   429
\fBfignore\fR is ignored if only one completion is possible.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   430
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   431
If the \fBcomplete\fR shell variable is set to `enhance', completion
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   432
1) ignores case and 2) considers periods, hyphens and underscores
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   433
(`.', `\-' and `_') to be word separators and hyphens and underscores to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   434
be equivalent.  If you had the following files
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   435
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   436
comp.lang.c      comp.lang.perl   comp.std.c++
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   437
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   438
comp.lang.c++    comp.std.c
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   439
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   440
and typed `mail \-f c.l.c[tab]', it would be completed to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   441
`mail \-f comp.lang.c', and ^D would list `comp.lang.c' and `comp.lang.c++'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   442
`mail \-f c..c++[^D]' would list `comp.lang.c++' and `comp.std.c++'.  Typing
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   443
`rm a\-\-file[^D]' in the following directory
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   444
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   445
A_silly_file    a-hyphenated-file    another_silly_file
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   446
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   447
would list all three files, because case is ignored and hyphens and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   448
underscores are equivalent.  Periods, however, are not equivalent to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   449
hyphens or underscores.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   450
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   451
Completion and listing are affected by several other shell variables:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   452
\fBrecexact\fR can be set to complete on the shortest possible unique
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   453
match, even if more typing might result in a longer match:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   454
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   455
> ls
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   456
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   457
fodder   foo      food     foonly
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   458
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   459
> set recexact
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   460
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   461
> rm fo[tab]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   462
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   463
just beeps, because `fo' could expand to `fod' or `foo', but if we type
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   464
another `o',
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   465
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   466
> rm foo[tab]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   467
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   468
> rm foo
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   469
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   470
the completion completes on `foo', even though `food' and `foonly'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   471
also match.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   472
\fBautoexpand\fR can be set to run the \fIexpand-history\fR editor command
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   473
before each completion attempt, \fBautocorrect\fR can be set to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   474
spelling-correct the word to be completed (see \fBSpelling correction\fR)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   475
before each completion attempt and \fBcorrect\fR can be set to complete
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   476
commands automatically after one hits `return'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   477
\fBmatchbeep\fR can be set to make completion beep or not beep in a variety
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   478
of situations, and \fBnobeep\fR can be set to never beep at all.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   479
\fBnostat\fR can be set to a list of directories and/or patterns that
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   480
match directories to prevent the completion mechanism from \fIstat\fR(2)ing
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   481
those directories.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   482
\fBlistmax\fR and \fBlistmaxrows\fR can be set to limit the number of items
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   483
and rows (respectively) that are listed without asking first.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   484
\fBrecognize_only_executables\fR can be set to make the shell list only
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   485
executables when listing commands, but it is quite slow.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   486
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   487
Finally, the \fIcomplete\fR builtin command can be used to tell the shell how
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   488
to complete words other than filenames, commands and variables.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   489
Completion and listing do not work on glob-patterns (see \fBFilename substitution\fR),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   490
but the \fIlist-glob\fR and \fIexpand-glob\fR editor commands perform
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   491
equivalent functions for glob-patterns.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   492
.SS "Spelling correction (+)"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   493
The shell can sometimes correct the spelling of filenames, commands and variable names
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   494
as well as completing and listing them.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   495
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   496
Individual words can be spelling-corrected with the \fIspell-word\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   497
editor command (usually bound to M-s and M-S)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   498
and the entire input buffer with \fIspell-line\fR (usually bound to M-$).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   499
The \fBcorrect\fR shell variable can be set to `cmd' to correct the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   500
command name or `all' to correct the entire line each time return is typed,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   501
and \fBautocorrect\fR can be set to correct the word to be completed
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   502
before each completion attempt.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   503
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   504
When spelling correction is invoked in any of these ways and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   505
the shell thinks that any part of the command line is misspelled,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   506
it prompts with the corrected line:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   507
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   508
> set correct = cmd
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   509
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   510
> lz /usr/bin
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   511
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   512
CORRECT>ls /usr/bin (y|n|e|a)?
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   513
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   514
One can answer `y' or space to execute the corrected line,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   515
`e' to leave the uncorrected command in the input buffer,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   516
`a' to abort the command as if `^C' had been hit, and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   517
anything else to execute the original line unchanged.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   518
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   519
Spelling correction recognizes user-defined completions (see the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   520
\fIcomplete\fR builtin command).  If an input word in a position for
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   521
which a completion is defined resembles a word in the completion list,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   522
spelling correction registers a misspelling and suggests the latter
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   523
word as a correction.  However, if the input word does not match any of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   524
the possible completions for that position, spelling correction does
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   525
not register a misspelling.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   526
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   527
Like completion, spelling correction works anywhere in the line,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   528
pushing the rest of the line to the right and possibly leaving
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   529
extra characters to the right of the cursor.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   530
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   531
Beware: spelling correction is not guaranteed to work the way one intends,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   532
and is provided mostly as an experimental feature.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   533
Suggestions and improvements are welcome.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   534
.SS "Editor commands (+)"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   535
`bindkey' lists key bindings and `bindkey \-l' lists and briefly describes
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   536
editor commands.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   537
Only new or especially interesting editor commands are described here.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   538
See \fIemacs\fR(1) and \fIvi\fR(1) for descriptions of each editor's
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   539
key bindings.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   540
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   541
The character or characters to which each command is bound by default is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   542
given in parentheses.  `^\fIcharacter\fR' means a control character and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   543
`M-\fIcharacter\fR' a meta character, typed as escape-\fIcharacter\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   544
on terminals without a meta key.  Case counts, but commands that are bound
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   545
to letters by default are bound to both lower- and uppercase letters for
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   546
convenience.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   547
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   548
.B complete-word \fR(tab)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   549
Completes a word as described under \fBCompletion and listing\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   550
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   551
.B complete-word-back \fR(not bound)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   552
Like \fIcomplete-word-fwd\fR, but steps up from the end of the list.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   553
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   554
.B complete-word-fwd \fR(not bound)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   555
Replaces the current word with the first word in the list of possible
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   556
completions.  May be repeated to step down through the list.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   557
At the end of the list, beeps and reverts to the incomplete word.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   558
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   559
.B complete-word-raw \fR(^X-tab)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   560
Like \fIcomplete-word\fR, but ignores user-defined completions.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   561
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   562
.B copy-prev-word \fR(M-^_)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   563
Copies the previous word in the current line into the input buffer.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   564
See also \fIinsert-last-word\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   565
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   566
.B dabbrev-expand \fR(M-/)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   567
Expands the current word to the most recent preceding one for which
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   568
the current is a leading substring, wrapping around the history list
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   569
(once) if necessary.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   570
Repeating \fIdabbrev-expand\fR without any intervening typing
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   571
changes to the next previous word etc., skipping identical matches
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   572
much like \fIhistory-search-backward\fR does.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   573
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   574
.B delete-char \fR(not bound)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   575
Deletes the character under the cursor.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   576
See also \fIdelete-char-or-list-or-eof\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   577
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   578
.B delete-char-or-eof \fR(not bound)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   579
Does \fIdelete-char\fR if there is a character under the cursor
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   580
or \fIend-of-file\fR on an empty line.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   581
See also \fIdelete-char-or-list-or-eof\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   582
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   583
.B delete-char-or-list \fR(not bound)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   584
Does \fIdelete-char\fR if there is a character under the cursor
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   585
or \fIlist-choices\fR at the end of the line.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   586
See also \fIdelete-char-or-list-or-eof\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   587
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   588
.B delete-char-or-list-or-eof \fR(^D)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   589
Does \fIdelete-char\fR if there is a character under the cursor,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   590
\fIlist-choices\fR at the end of the line
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   591
or \fIend-of-file\fR on an empty line.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   592
See also those three commands, each of which does only a single action, and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   593
\fIdelete-char-or-eof\fR, \fIdelete-char-or-list\fR and \fIlist-or-eof\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   594
each of which does a different two out of the three.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   595
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   596
.B down-history \fR(down-arrow, ^N)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   597
Like \fIup-history\fR, but steps down, stopping at the original input line.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   598
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   599
.B end-of-file \fR(not bound)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   600
Signals an end of file, causing the shell to exit unless the \fBignoreeof\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   601
shell variable (q.v.) is set to prevent this.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   602
See also \fIdelete-char-or-list-or-eof\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   603
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   604
.B expand-history \fR(M-space)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   605
Expands history substitutions in the current word.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   606
See \fBHistory substitution\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   607
See also \fImagic-space\fR, \fItoggle-literal-history\fR and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   608
the \fBautoexpand\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   609
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   610
.B expand-glob \fR(^X-*)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   611
Expands the glob-pattern to the left of the cursor.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   612
See \fBFilename substitution\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   613
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   614
.B expand-line \fR(not bound)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   615
Like \fIexpand-history\fR, but
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   616
expands history substitutions in each word in the input buffer,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   617
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   618
.B expand-variables \fR(^X-$)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   619
Expands the variable to the left of the cursor.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   620
See \fBVariable substitution\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   621
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   622
.B history-search-backward \fR(M-p, M-P)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   623
Searches backwards through the history list for a command beginning with
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   624
the current contents of the input buffer up to the cursor and copies it
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   625
into the input buffer.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   626
The search string may be a glob-pattern (see \fBFilename substitution\fR)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   627
containing `*', `?', `[]' or `{}'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   628
\fIup-history\fR and \fIdown-history\fR will proceed from the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   629
appropriate point in the history list.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   630
Emacs mode only.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   631
See also \fIhistory-search-forward\fR and \fIi-search-back\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   632
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   633
.B history-search-forward \fR(M-n, M-N)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   634
Like \fIhistory-search-backward\fR, but searches forward.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   635
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   636
.B i-search-back \fR(not bound)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   637
Searches backward like \fIhistory-search-backward\fR, copies the first match
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   638
into the input buffer with the cursor positioned at the end of the pattern,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   639
and prompts with `bck: ' and the first match.  Additional characters may be
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   640
typed to extend the search, \fIi-search-back\fR may be typed to continue
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   641
searching with the same pattern, wrapping around the history list if
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   642
necessary, (\fIi-search-back\fR must be bound to a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   643
single character for this to work) or one of the following special characters
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   644
may be typed:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   645
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   646
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   647
.RS +4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   648
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   649
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   650
^W
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   651
Appends the rest of the word under the cursor to the search pattern.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   652
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   653
delete (or any character bound to \fIbackward-delete-char\fR)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   654
Undoes the effect of the last character typed and deletes a character
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   655
from the search pattern if appropriate.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   656
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   657
^G
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   658
If the previous search was successful, aborts the entire search.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   659
If not, goes back to the last successful search.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   660
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   661
escape
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   662
Ends the search, leaving the current line in the input buffer.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   663
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   664
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   665
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   666
Any other character not bound to \fIself-insert-command\fR terminates the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   667
search, leaving the current line in the input buffer, and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   668
is then interpreted as normal input.  In particular, a carriage return
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   669
causes the current line to be executed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   670
Emacs mode only.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   671
See also \fIi-search-fwd\fR and \fIhistory-search-backward\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   672
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   673
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   674
.B i-search-fwd \fR(not bound)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   675
Like \fIi-search-back\fR, but searches forward.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   676
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   677
.B insert-last-word \fR(M-_)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   678
Inserts the last word of the previous input line (`!$') into the input buffer.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   679
See also \fIcopy-prev-word\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   680
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   681
.B list-choices \fR(M-^D)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   682
Lists completion possibilities as described under \fBCompletion and listing\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   683
See also \fIdelete-char-or-list-or-eof\fR and \fIlist-choices-raw\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   684
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   685
.B list-choices-raw \fR(^X-^D)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   686
Like \fIlist-choices\fR, but ignores user-defined completions.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   687
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   688
.B list-glob \fR(^X-g, ^X-G)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   689
Lists (via the \fIls\-F\fR builtin) matches to the glob-pattern
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   690
(see \fBFilename substitution\fR) to the left of the cursor.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   691
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   692
.B list-or-eof \fR(not bound)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   693
Does \fIlist-choices\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   694
or \fIend-of-file\fR on an empty line.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   695
See also \fIdelete-char-or-list-or-eof\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   696
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   697
.B magic-space \fR(not bound)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   698
Expands history substitutions in the current line,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   699
like \fIexpand-history\fR, and inserts a space.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   700
\fImagic-space\fR is designed to be bound to the space bar,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   701
but is not bound by default.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   702
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   703
.B normalize-command \fR(^X-?)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   704
Searches for the current word in PATH and, if it is found, replaces it with
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   705
the full path to the executable.  Special characters are quoted.  Aliases are
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   706
expanded and quoted but commands within aliases are not.  This command is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   707
useful with commands that take commands as arguments, e.g., `dbx' and `sh \-x'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   708
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   709
.B normalize-path \fR(^X-n, ^X-N)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   710
Expands the current word as described under the `expand' setting
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   711
of the \fBsymlinks\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   712
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   713
.B overwrite-mode \fR(unbound)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   714
Toggles between input and overwrite modes.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   715
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   716
.B run-fg-editor \fR(M-^Z)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   717
Saves the current input line and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   718
looks for a stopped job with a name equal to the last component of the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   719
file name part of the \fBEDITOR\fR or \fBVISUAL\fR environment variables,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   720
or, if neither is set, `ed' or `vi'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   721
If such a job is found, it is restarted as if `fg %\fIjob\fR' had been
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   722
typed.  This is used to toggle back and forth between an editor and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   723
the shell easily.  Some people bind this command to `^Z' so they
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   724
can do this even more easily.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   725
.TP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   726
.B run-help \fR(M-h, M-H)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   727
Searches for documentation on the current command, using the same notion of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   728
`current command' as the completion routines, and prints it.  There is no way
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   729
to use a pager; \fIrun-help\fR is designed for short help files.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   730
If the special alias \fBhelpcommand\fR is defined, it is run with the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   731
command name as a sole argument.  Else,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   732
documentation should be in a file named \fIcommand\fR.help, \fIcommand\fR.1,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   733
\fIcommand\fR.6, \fIcommand\fR.8 or \fIcommand\fR, which should be in one
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   734
of the directories listed in the \fBHPATH\fR environment variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   735
If there is more than one help file only the first is printed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   736
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   737
.B self-insert-command \fR(text characters)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   738
In insert mode (the default), inserts the typed character into the input line after the character under the cursor.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   739
In overwrite mode, replaces the character under the cursor with the typed character.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   740
The input mode is normally preserved between lines, but the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   741
\fBinputmode\fR shell variable can be set to `insert' or `overwrite' to put the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   742
editor in that mode at the beginning of each line.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   743
See also \fIoverwrite-mode\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   744
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   745
.B sequence-lead-in \fR(arrow prefix, meta prefix, ^X)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   746
Indicates that the following characters are part of a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   747
multi-key sequence.  Binding a command to a multi-key sequence really creates
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   748
two bindings: the first character to \fIsequence-lead-in\fR and the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   749
whole sequence to the command.  All sequences beginning with a character
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   750
bound to \fIsequence-lead-in\fR are effectively bound to \fIundefined-key\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   751
unless bound to another command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   752
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   753
.B spell-line \fR(M-$)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   754
Attempts to correct the spelling of each word in the input buffer, like
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   755
\fIspell-word\fR, but ignores words whose first character is one of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   756
`\-', `!', `^' or `%', or which contain `\\', `*' or `?', to avoid problems
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   757
with switches, substitutions and the like.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   758
See \fBSpelling correction\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   759
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   760
.B spell-word \fR(M-s, M-S)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   761
Attempts to correct the spelling of the current word as described
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   762
under \fBSpelling correction\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   763
Checks each component of a word which appears to be a pathname.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   764
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   765
.B toggle-literal-history \fR(M-r, M-R)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   766
Expands or `unexpands' history substitutions in the input buffer.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   767
See also \fIexpand-history\fR and the \fBautoexpand\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   768
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   769
.B undefined-key \fR(any unbound key)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   770
Beeps.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   771
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   772
.B up-history \fR(up-arrow, ^P)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   773
Copies the previous entry in the history list into the input buffer.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   774
If \fBhistlit\fR is set, uses the literal form of the entry.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   775
May be repeated to step up through the history list, stopping at the top.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   776
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   777
.B vi-search-back \fR(?)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   778
Prompts with `?' for a search string (which may be a glob-pattern, as with
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   779
\fIhistory-search-backward\fR), searches for it and copies it into the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   780
input buffer.  The bell rings if no match is found.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   781
Hitting return ends the search and leaves the last match in the input
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   782
buffer.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   783
Hitting escape ends the search and executes the match.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   784
\fIvi\fR mode only.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   785
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   786
.B vi-search-fwd \fR(/)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   787
Like \fIvi-search-back\fR, but searches forward.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   788
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   789
.B which-command \fR(M-?)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   790
Does a \fIwhich\fR (see the description of the builtin command) on the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   791
first word of the input buffer.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   792
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   793
.B yank-pop \fR(M-y)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   794
When executed immediately after a \fIyank\fR or another \fIyank-pop\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   795
replaces the yanked string with the next previous string from the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   796
killring. This also has the effect of rotating the killring, such that
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   797
this string will be considered the most recently killed by a later
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   798
\fIyank\fR command. Repeating \fIyank-pop\fR will cycle through the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   799
killring any number of times.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   800
.SS "Lexical structure"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   801
The shell splits input lines into words at blanks and tabs.  The special
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   802
characters `&', `|', `;', `<', `>', `(', and `)' and the doubled characters
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   803
`&&', `||', `<<' and `>>' are always separate words, whether or not they are
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   804
surrounded by whitespace.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   805
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   806
When the shell's input is not a terminal, the character `#' is taken to begin a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   807
comment.  Each `#' and the rest of the input line on which it appears is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   808
discarded before further parsing.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   809
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   810
A special character (including a blank or tab) may be prevented from having
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   811
its special meaning, and possibly made part of another word, by preceding it
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   812
with a backslash (`\\') or enclosing it in single (`''), double (`"') or
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   813
backward (``') quotes.  When not otherwise quoted a newline preceded by a `\\'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   814
is equivalent to a blank, but inside quotes this sequence results in a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   815
newline.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   816
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   817
Furthermore, all \fBSubstitutions\fR (see below) except \fBHistory substitution\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   818
can be prevented by enclosing the strings (or parts of strings)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   819
in which they appear with single quotes or by quoting the crucial character(s)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   820
(e.g., `$' or ``' for \fBVariable substitution\fR or \fBCommand substitution\fR respectively)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   821
with `\\'.  (\fBAlias substitution\fR is no exception: quoting in any way any
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   822
character of a word for which an \fIalias\fR has been defined prevents
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   823
substitution of the alias.  The usual way of quoting an alias is to precede it
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   824
with a backslash.) \fBHistory substitution\fR is prevented by
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   825
backslashes but not by single quotes.  Strings quoted with double or backward
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   826
quotes undergo \fBVariable substitution\fR and \fBCommand substitution\fR, but other
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   827
substitutions are prevented.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   828
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   829
Text inside single or double quotes becomes a single word (or part of one).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   830
Metacharacters in these strings, including blanks and tabs, do not form
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   831
separate words.  Only in one special case (see \fBCommand substitution\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   832
below) can a double-quoted string yield parts of more than one word;
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   833
single-quoted strings never do.  Backward quotes are special: they signal
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   834
\fBCommand substitution\fR (q.v.), which may result in more than one word.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   835
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   836
Quoting complex strings, particularly strings which themselves contain quoting
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   837
characters, can be confusing.  Remember that quotes need not be used as they are
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   838
in human writing!  It may be easier to quote not an entire string, but only
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   839
those parts of the string which need quoting, using different types of quoting
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   840
to do so if appropriate.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   841
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   842
The \fBbackslash_quote\fR shell variable (q.v.) can be set to make backslashes
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   843
always quote `\\', `'', and `"'.  (+) This may make complex quoting tasks
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   844
easier, but it can cause syntax errors in \fIcsh\fR(1) scripts.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   845
.SS Substitutions
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   846
We now describe the various transformations the shell performs on the input in
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   847
the order in which they occur.  We note in passing the data structures involved
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   848
and the commands and variables which affect them.  Remember that substitutions
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   849
can be prevented by quoting as described under \fBLexical structure\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   850
.SS "History substitution"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   851
Each command, or ``event'', input from the terminal is saved in the history
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   852
list.  The previous command is always saved, and the \fBhistory\fR shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   853
variable can be set to a number to save that many commands.  The \fBhistdup\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   854
shell variable can be set to not save duplicate events or consecutive duplicate
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   855
events.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   856
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   857
Saved commands are numbered sequentially from 1 and stamped with the time.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   858
It is not usually necessary to use event numbers, but the current event number
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   859
can be made part of the prompt by placing an `!' in the \fBprompt\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   860
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   861
The shell actually saves history in expanded and literal (unexpanded) forms.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   862
If the \fBhistlit\fR shell variable is set, commands that display and store
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   863
history use the literal form.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   864
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   865
The \fIhistory\fR builtin command can print, store in a file, restore
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   866
and clear the history list at any time,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   867
and the \fBsavehist\fR and \fBhistfile\fR shell variables can be can be set to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   868
store the history list automatically on logout and restore it on login.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   869
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   870
History substitutions introduce words from the history list into the input
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   871
stream, making it easy to repeat commands, repeat arguments of a previous
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   872
command in the current command, or fix spelling mistakes in the previous
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   873
command with little typing and a high degree of confidence.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   874
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   875
History substitutions begin with the character `!'.  They may begin anywhere in
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   876
the input stream, but they do not nest.  The `!' may be preceded by a `\\' to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   877
prevent its special meaning; for convenience, a `!' is passed unchanged when it
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   878
is followed by a blank, tab, newline, `=' or `('.  History substitutions also
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   879
occur when an input line begins with `^'.  This special abbreviation will be
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   880
described later.  The characters used to signal history substitution (`!' and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   881
`^') can be changed by setting the \fBhistchars\fR shell variable.  Any input
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   882
line which contains a history substitution is printed before it is executed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   883
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   884
A history substitution may have an ``event specification'', which indicates
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   885
the event from which words are to be taken, a ``word designator'',
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   886
which selects particular words from the chosen event, and/or a ``modifier'',
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   887
which manipulates the selected words.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   888
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   889
An event specification can be
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   890
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   891
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   892
.RS +4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   893
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   894
.I n
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   895
A number, referring to a particular event
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   896
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   897
\-\fIn\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   898
An offset, referring to the event \fIn\fR before the current event
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   899
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   900
#
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   901
The current event.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   902
This should be used carefully in \fIcsh\fR(1), where there is no check for
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   903
recursion.  \fItcsh\fR allows 10 levels of recursion.  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   904
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   905
!
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   906
The previous event (equivalent to `\-1')
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   907
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   908
.I s
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   909
The most recent event whose first word begins with the string \fIs\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   910
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   911
?\fIs\fR?
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   912
The most recent event which contains the string \fIs\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   913
The second `?' can be omitted if it is immediately followed by a newline.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   914
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   915
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   916
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   917
For example, consider this bit of someone's history list:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   918
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   919
\ 9  8:30    nroff \-man wumpus.man
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   920
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   921
10  8:31    cp wumpus.man wumpus.man.old
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   922
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   923
11  8:36    vi wumpus.man
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   924
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   925
12  8:37    diff wumpus.man.old wumpus.man
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   926
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   927
The commands are shown with their event numbers and time stamps.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   928
The current event, which we haven't typed in yet, is event 13.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   929
`!11' and `!\-2' refer to event 11.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   930
`!!' refers to the previous event, 12.  `!!' can be abbreviated `!' if it is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   931
followed by `:' (`:' is described below).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   932
`!n' refers to event 9, which begins with `n'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   933
`!?old?' also refers to event 12, which contains `old'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   934
Without word designators or modifiers history references simply expand to the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   935
entire event, so we might type `!cp' to redo the copy command or `!!|more'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   936
if the `diff' output scrolled off the top of the screen.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   937
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   938
History references may be insulated from the surrounding text with braces if
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   939
necessary.  For example, `!vdoc' would look for a command beginning with
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   940
`vdoc', and, in this example, not find one, but `!{v}doc' would expand
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   941
unambiguously to `vi wumpus.mandoc'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   942
Even in braces, history substitutions do not nest.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   943
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   944
(+) While \fIcsh\fR(1) expands, for example, `!3d' to event 3 with the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   945
letter `d' appended to it, \fItcsh\fR expands it to the last event beginning
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   946
with `3d'; only completely numeric arguments are treated as event numbers.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   947
This makes it possible to recall events beginning with numbers.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   948
To expand `!3d' as in \fIcsh\fR(1) say `!{3}d'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   949
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   950
To select words from an event we can follow the event specification by a `:'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   951
and a designator for the desired words.  The words of an input line are
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   952
numbered from 0, the first (usually command) word being 0, the second word
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   953
(first argument) being 1, etc.  The basic word designators are:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   954
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   955
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   956
.RS +4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   957
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   958
0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   959
The first (command) word
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   960
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   961
.I n
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   962
The \fIn\fRth argument
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   963
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   964
^
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   965
The first argument, equivalent to `1'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   966
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   967
$
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   968
The last argument
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   969
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   970
%
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   971
The word matched by an ?\fIs\fR? search
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   972
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   973
.I x\-y
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   974
A range of words
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   975
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   976
.I \-y
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   977
Equivalent to \fI`0\-y'\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   978
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   979
*
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   980
Equivalent to `^\-$', but returns nothing if the event contains only 1 word
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   981
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   982
.I x*
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   983
Equivalent to \fI`x\-$'\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   984
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   985
.I x\-
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   986
Equivalent to \fI`x*'\fR, but omitting the last word (`$')
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   987
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   988
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   989
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   990
Selected words are inserted into the command line separated by single blanks.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   991
For example, the `diff' command in the previous example might have been
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   992
typed as `diff !!:1.old !!:1' (using `:1' to select the first argument
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   993
from the previous event) or `diff !\-2:2 !\-2:1' to select and swap the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   994
arguments from the `cp' command.  If we didn't care about the order of the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   995
`diff' we might have said `diff !\-2:1\-2' or simply `diff !\-2:*'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   996
The `cp' command might have been written `cp wumpus.man !#:1.old', using `#'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   997
to refer to the current event.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   998
`!n:\- hurkle.man' would reuse the first two words from the `nroff' command
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   999
to say `nroff \-man hurkle.man'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1000
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1001
The `:' separating the event specification from the word designator can be
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1002
omitted if the argument selector begins with a `^', `$', `*', `%' or `\-'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1003
For example, our `diff' command might have been `diff !!^.old !!^' or,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1004
equivalently, `diff !!$.old !!$'.  However, if `!!' is abbreviated `!',
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1005
an argument selector beginning with `\-' will be interpreted as an event
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1006
specification.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1007
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1008
A history reference may have a word designator but no event specification.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1009
It then references the previous command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1010
Continuing our `diff' example, we could have said simply `diff
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1011
!^.old !^' or, to get the arguments in the opposite order, just `diff !*'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1012
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1013
The word or words in a history reference can be edited, or ``modified'',
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1014
by following it with one or more modifiers, each preceded by a `:':
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1015
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1016
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1017
.RS +4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1018
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1019
h
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1020
Remove a trailing pathname component, leaving the head.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1021
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1022
t
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1023
Remove all leading pathname components, leaving the tail.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1024
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1025
r
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1026
Remove a filename extension `.xxx', leaving the root name.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1027
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1028
e
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1029
Remove all but the extension.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1030
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1031
u
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1032
Uppercase the first lowercase letter.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1033
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1034
l
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1035
Lowercase the first uppercase letter.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1036
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1037
s\fI/l/r/\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1038
Substitute \fIl\fR for \fIr\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1039
\fIl\fR is simply a string like \fIr\fR, not a regular expression as in
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1040
the eponymous \fIed\fR(1) command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1041
Any character may be used as the delimiter in place of `/';
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1042
a `\\' can be used to quote the delimiter inside \fIl\fR and \fIr\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1043
The character `&' in the \fIr\fR is replaced by \fIl\fR; `\\' also quotes `&'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1044
If \fIl\fR is empty (``''), the \fIl\fR from a previous substitution or the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1045
\fIs\fR from a previous search or event number in event specification is used.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1046
The trailing delimiter may be omitted if it is immediately followed by a newline.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1047
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1048
&
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1049
Repeat the previous substitution.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1050
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1051
g
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1052
Apply the following modifier once to each word.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1053
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1054
a (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1055
Apply the following modifier as many times as possible to a single word.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1056
`a' and `g' can be used together to apply a modifier globally.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1057
With the `s' modifier, only the patterns contained in the original word are
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1058
substituted, not patterns that contain any substitution result.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1059
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1060
p
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1061
Print the new command line but do not execute it.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1062
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1063
q
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1064
Quote the substituted words, preventing further substitutions.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1065
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1066
x
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1067
Like q, but break into words at blanks, tabs and newlines.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1068
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1069
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1070
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1071
Modifiers are applied to only the first modifiable word (unless `g' is used).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1072
It is an error for no word to be modifiable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1073
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1074
For example, the `diff' command might have been written as `diff wumpus.man.old
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1075
!#^:r', using `:r' to remove `.old' from the first argument on the same line
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1076
(`!#^').  We could say `echo hello out there', then `echo !*:u' to capitalize
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1077
`hello', `echo !*:au' to say it out loud, or `echo !*:agu' to really shout.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1078
We might follow `mail \-s "I forgot my password" rot' with `!:s/rot/root' to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1079
correct the spelling of `root' (but see \fBSpelling correction\fR for a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1080
different approach).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1081
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1082
There is a special abbreviation for substitutions.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1083
`^', when it is the first character on an input line, is equivalent to `!:s^'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1084
Thus we might have said `^rot^root' to make the spelling correction in the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1085
previous example.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1086
This is the only history substitution which does not explicitly begin with `!'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1087
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1088
(+) In \fIcsh\fR as such, only one modifier may be applied to each history
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1089
or variable expansion.  In \fItcsh\fR, more than one may be used, for example
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1090
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1091
% mv wumpus.man /usr/man/man1/wumpus.1
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1092
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1093
% man !$:t:r
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1094
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1095
man wumpus
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1096
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1097
In \fIcsh\fR, the result would be `wumpus.1:r'.  A substitution followed by a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1098
colon may need to be insulated from it with braces:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1099
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1100
> mv a.out /usr/games/wumpus
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1101
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1102
> setenv PATH !$:h:$PATH
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1103
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1104
Bad ! modifier: $.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1105
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1106
> setenv PATH !{\-2$:h}:$PATH
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1107
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1108
setenv PATH /usr/games:/bin:/usr/bin:.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1109
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1110
The first attempt would succeed in \fIcsh\fR but fails in \fItcsh\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1111
because \fItcsh\fR expects another modifier after the second colon
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1112
rather than `$'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1113
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1114
Finally, history can be accessed through the editor as well as through
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1115
the substitutions just described.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1116
The \fIup-\fR and \fIdown-history\fR, \fIhistory-search-backward\fR and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1117
\fI-forward\fR, \fIi-search-back\fR and \fI-fwd\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1118
\fIvi-search-back\fR and \fI-fwd\fR, \fIcopy-prev-word\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1119
and \fIinsert-last-word\fR editor commands search for
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1120
events in the history list and copy them into the input buffer.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1121
The \fItoggle-literal-history\fR editor command switches between the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1122
expanded and literal forms of history lines in the input buffer.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1123
\fIexpand-history\fR and \fIexpand-line\fR expand history substitutions
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1124
in the current word and in the entire input buffer respectively.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1125
.SS "Alias substitution"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1126
The shell maintains a list of aliases which can be set, unset and printed by
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1127
the \fIalias\fR and \fIunalias\fR commands.  After a command line is parsed
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1128
into simple commands (see \fBCommands\fR) the first word of each command,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1129
left-to-right, is checked to see if it has an alias.  If so, the first word is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1130
replaced by the alias.  If the alias contains a history reference, it undergoes
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1131
\fBHistory substitution\fR (q.v.) as though the original command were the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1132
previous input line.  If the alias does not contain a history reference, the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1133
argument list is left untouched.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1134
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1135
Thus if the alias for `ls' were `ls \-l' the command `ls /usr' would become `ls
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1136
\-l /usr', the argument list here being undisturbed.  If the alias for `lookup'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1137
were `grep !^ /etc/passwd' then `lookup bill' would become `grep bill
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1138
/etc/passwd'.  Aliases can be used to introduce parser metasyntax.  For
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1139
example, `alias print 'pr \e!* | lpr'' defines a ``command'' (`print') which
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1140
\fIpr\fR(1)s its arguments to the line printer.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1141
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1142
Alias substitution is repeated until the first word of the command has no
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1143
alias.  If an alias substitution does not change the first word (as in the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1144
previous example) it is flagged to prevent a loop.  Other loops are detected and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1145
cause an error.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1146
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1147
Some aliases are referred to by the shell; see \fBSpecial aliases\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1148
.SS "Variable substitution"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1149
The shell maintains a list of variables, each of which has as value a list of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1150
zero or more words.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1151
The values of shell variables can be displayed and changed with the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1152
\fIset\fR and \fIunset\fR commands.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1153
The system maintains its own list of ``environment'' variables.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1154
These can be displayed and changed with \fIprintenv\fR, \fIsetenv\fR and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1155
\fIunsetenv\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1156
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1157
(+) Variables may be made read-only with `set \-r' (q.v.)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1158
Read-only variables may not be modified or unset;
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1159
attempting to do so will cause an error.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1160
Once made read-only, a variable cannot be made writable,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1161
so `set \-r' should be used with caution.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1162
Environment variables cannot be made read-only.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1163
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1164
Some variables are set by the shell or referred to by it.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1165
For instance, the \fBargv\fR variable is an image of the shell's argument
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1166
list, and words of this variable's value are referred to in special ways.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1167
Some of the variables referred to by the shell are toggles;
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1168
the shell does not care what their value is, only whether they are set or not.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1169
For instance, the \fBverbose\fR variable is a toggle which causes command
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1170
input to be echoed.  The \fB\-v\fR command line option sets this variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1171
\fBSpecial shell variables\fR lists all variables which are referred to by the shell.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1172
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1173
Other operations treat variables numerically.  The `@' command permits numeric
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1174
calculations to be performed and the result assigned to a variable.  Variable
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1175
values are, however, always represented as (zero or more) strings.  For the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1176
purposes of numeric operations, the null string is considered to be zero, and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1177
the second and subsequent words of multi-word values are ignored.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1178
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1179
After the input line is aliased and parsed, and before each command is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1180
executed, variable substitution is performed keyed by `$' characters.  This
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1181
expansion can be prevented by preceding the `$' with a `\e' except within `"'s
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1182
where it \fIalways\fR occurs, and within `''s where it \fInever\fR occurs.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1183
Strings quoted by ``' are interpreted later (see \fBCommand substitution\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1184
below) so `$' substitution does not occur there until later,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1185
if at all.  A `$' is passed unchanged if followed by a blank, tab, or
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1186
end-of-line.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1187
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1188
Input/output redirections are recognized before variable expansion, and are
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1189
variable expanded separately.  Otherwise, the command name and entire argument
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1190
list are expanded together.  It is thus possible for the first (command) word
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1191
(to this point) to generate more than one word, the first of which becomes the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1192
command name, and the rest of which become arguments.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1193
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1194
Unless enclosed in `"' or given the `:q' modifier the results of variable
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1195
substitution may eventually be command and filename substituted.  Within `"', a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1196
variable whose value consists of multiple words expands to a (portion of a)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1197
single word, with the words of the variable's value separated by blanks.  When
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1198
the `:q' modifier is applied to a substitution the variable will expand to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1199
multiple words with each word separated by a blank and quoted to prevent later
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1200
command or filename substitution.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1201
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1202
The following metasequences are provided for introducing variable values into
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1203
the shell input.  Except as noted, it is an error to reference a variable which
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1204
is not set.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1205
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1206
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1207
$\fIname\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1208
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1209
${\fIname\fR}
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1210
Substitutes the words of the value of variable \fIname\fR, each separated
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1211
by a blank.  Braces insulate \fIname\fR from following characters which would
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1212
otherwise be part of it.  Shell variables have names consisting of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1213
letters and digits starting with a letter.  The underscore character is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1214
considered a letter.  If \fIname\fR is not a shell variable, but is set in the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1215
environment, then that value is returned (but some of the other forms
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1216
given below are not available in this case).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1217
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1218
$\fIname\fR[\fIselector\fR]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1219
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1220
${\fIname\fR[\fIselector\fR]}
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1221
Substitutes only the selected words from the value of \fIname\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1222
The \fIselector\fR is subjected to `$' substitution and may consist of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1223
a single number or two numbers separated by a `\-'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1224
The first word of a variable's value is numbered `1'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1225
If the first number of a range is omitted it defaults to `1'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1226
If the last member of a range is omitted it defaults to `$#\fIname\fR'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1227
The \fIselector\fR `*' selects all words.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1228
It is not an error for a range to be empty if the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1229
second argument is omitted or in range.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1230
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1231
$0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1232
Substitutes the name of the file from which command input
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1233
is being read.  An error occurs if the name is not known.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1234
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1235
$\fInumber\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1236
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1237
${\fInumber\fR}
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1238
Equivalent to `$argv[\fInumber\fR]'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1239
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1240
$*
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1241
Equivalent to `$argv', which is equivalent to `$argv[*]'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1242
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1243
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1244
The `:' modifiers described under \fBHistory substitution\fR, except for `:p',
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1245
can be applied to the substitutions above.  More than one may be used.  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1246
Braces may be needed to insulate a variable substitution from a literal colon
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1247
just as with \fBHistory substitution\fR (q.v.); any modifiers must appear
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1248
within the braces.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1249
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1250
The following substitutions can not be modified with `:' modifiers.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1251
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1252
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1253
$?\fIname\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1254
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1255
${?\fIname\fR}
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1256
Substitutes the string `1' if \fIname\fR is set, `0' if it is not.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1257
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1258
$?0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1259
Substitutes `1' if the current input filename is known, `0' if it is not.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1260
Always `0' in interactive shells.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1261
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1262
$#\fIname\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1263
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1264
${#\fIname\fR}
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1265
Substitutes the number of words in \fIname\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1266
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1267
$#
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1268
Equivalent to `$#argv'.  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1269
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1270
$%\fIname\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1271
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1272
${%\fIname\fR}
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1273
Substitutes the number of characters in \fIname\fR.  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1274
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1275
$%\fInumber\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1276
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1277
${%\fInumber\fR}
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1278
Substitutes the number of characters in $argv[\fInumber\fR].  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1279
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1280
$?
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1281
Equivalent to `$status'.  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1282
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1283
$$
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1284
Substitutes the (decimal) process number of the (parent) shell.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1285
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1286
$!
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1287
Substitutes the (decimal) process number of the last
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1288
background process started by this shell.  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1289
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1290
$_
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1291
Substitutes the command line of the last command executed.  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1292
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1293
$<
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1294
Substitutes a line from the standard input, with no further interpretation
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1295
thereafter.  It can be used to read from the keyboard in a shell script.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1296
(+) While \fIcsh\fR always quotes $<, as if it were equivalent to `$<:q',
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1297
\fItcsh\fR does not.  Furthermore, when \fItcsh\fR is waiting for a line to be
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1298
typed the user may type an interrupt to interrupt the sequence into
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1299
which the line is to be substituted, but \fIcsh\fR does not allow this.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1300
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1301
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1302
The editor command \fIexpand-variables\fR, normally bound to `^X-$',
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1303
can be used to interactively expand individual variables.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1304
.SS "Command, filename and directory stack substitution"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1305
The remaining substitutions are applied selectively to the arguments of builtin
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1306
commands.  This means that portions of expressions which are not evaluated are
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1307
not subjected to these expansions.  For commands which are not internal to the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1308
shell, the command name is substituted separately from the argument list.  This
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1309
occurs very late, after input-output redirection is performed, and in a child
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1310
of the main shell.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1311
.SS "Command substitution"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1312
Command substitution is indicated by a command enclosed in ``'.  The output
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1313
from such a command is broken into separate words at blanks, tabs and newlines,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1314
and null words are discarded.  The output is variable and command substituted
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1315
and put in place of the original string.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1316
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1317
Command substitutions inside double
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1318
quotes (`"') retain blanks and tabs; only newlines force new words.  The single
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1319
final newline does not force a new word in any case.  It is thus possible for a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1320
command substitution to yield only part of a word, even if the command outputs
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1321
a complete line.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1322
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1323
By default, the shell since version 6.12 replaces all newline and carriage 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1324
return characters in the command by spaces.  If this is switched off by
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1325
unsetting \fBcsubstnonl\fR, newlines separate commands as usual.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1326
.SS "Filename substitution"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1327
If a word contains any of the characters `*', `?', `[' or `{' or begins with
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1328
the character `~' it is a candidate for filename substitution, also known as
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1329
``globbing''.  This word is then regarded as a pattern (``glob-pattern''), and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1330
replaced with an alphabetically sorted list of file names which match the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1331
pattern.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1332
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1333
In matching filenames, the character `.' at the beginning of a filename or
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1334
immediately following a `/', as well as the character `/' must be matched
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1335
explicitly.  The character `*' matches any string of characters, including the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1336
null string.  The character `?' matches any single character.  The sequence
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1337
`[...]' matches any one of the characters enclosed.  Within `[...]', a pair of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1338
characters separated by `\-' matches any character lexically between the two.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1339
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1340
(+) Some glob-patterns can be negated:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1341
The sequence `[^...]' matches any single character \fInot\fR specified by the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1342
characters and/or ranges of characters in the braces.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1343
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1344
An entire glob-pattern can also be negated with `^':
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1345
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1346
> echo *
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1347
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1348
bang crash crunch ouch
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1349
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1350
> echo ^cr*
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1351
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1352
bang ouch
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1353
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1354
Glob-patterns which do not use `?', `*', or `[]' or which use `{}' or `~'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1355
(below) are not negated correctly.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1356
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1357
The metanotation `a{b,c,d}e' is a shorthand for `abe ace ade'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1358
Left-to-right order is preserved: `/usr/source/s1/{oldls,ls}.c' expands
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1359
to `/usr/source/s1/oldls.c /usr/source/s1/ls.c'.  The results of matches are
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1360
sorted separately at a low level to preserve this order:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1361
`../{memo,*box}' might expand to `../memo ../box ../mbox'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1362
(Note that `memo' was not sorted with the results of matching `*box'.)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1363
It is not an error when this construct expands to files which do not exist,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1364
but it is possible to get an error from a command to which the expanded list
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1365
is passed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1366
This construct may be nested.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1367
As a special case the words `{', `}' and `{}' are passed undisturbed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1368
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1369
The character `~' at the beginning of a filename refers to home directories.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1370
Standing alone, i.e., `~', it expands to the invoker's home directory as
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1371
reflected in the value of the \fBhome\fR shell variable.  When followed by a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1372
name consisting of letters, digits and `\-' characters the shell searches for a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1373
user with that name and substitutes their home directory; thus `~ken' might
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1374
expand to `/usr/ken' and `~ken/chmach' to `/usr/ken/chmach'.  If the character
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1375
`~' is followed by a character other than a letter or `/' or appears elsewhere
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1376
than at the beginning of a word, it is left undisturbed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1377
A command like `setenv MANPATH /usr/man:/usr/local/man:~/lib/man' does not,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1378
therefore, do home directory substitution as one might hope.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1379
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1380
It is an error for a glob-pattern containing `*', `?', `[' or `~', with or
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1381
without `^', not to match any files.  However, only one pattern in a list of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1382
glob-patterns must match a file (so that, e.g., `rm *.a *.c *.o' would fail
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1383
only if there were no files in the current directory ending in `.a', `.c', or
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1384
`.o'), and if the \fBnonomatch\fR shell variable is set a pattern (or list
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1385
of patterns) which matches nothing is left unchanged rather than causing
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1386
an error.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1387
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1388
The \fBnoglob\fR shell variable can be set to prevent filename substitution,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1389
and the \fIexpand-glob\fR editor command, normally bound to `^X-*', can be
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1390
used to interactively expand individual filename substitutions.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1391
.SS "Directory stack substitution (+)"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1392
The directory stack is a list of directories, numbered from zero, used by the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1393
\fIpushd\fR, \fIpopd\fR and \fIdirs\fR builtin commands (q.v.).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1394
\fIdirs\fR can print, store in a file, restore and clear the directory stack
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1395
at any time, and the \fBsavedirs\fR and \fBdirsfile\fR shell variables can be set to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1396
store the directory stack automatically on logout and restore it on login.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1397
The \fBdirstack\fR shell variable can be examined to see the directory stack and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1398
set to put arbitrary directories into the directory stack.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1399
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1400
The character `=' followed by one or more digits expands to an entry in
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1401
the directory stack.  The special case `=\-' expands to the last directory in
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1402
the stack.  For example,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1403
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1404
> dirs \-v
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1405
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1406
0       /usr/bin
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1407
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1408
1       /usr/spool/uucp
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1409
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1410
2       /usr/accts/sys
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1411
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1412
> echo =1
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1413
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1414
/usr/spool/uucp
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1415
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1416
> echo =0/calendar
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1417
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1418
/usr/bin/calendar
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1419
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1420
> echo =\-
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1421
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1422
/usr/accts/sys
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1423
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1424
The \fBnoglob\fR and \fBnonomatch\fR shell variables and the \fIexpand-glob\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1425
editor command apply to directory stack as well as filename substitutions.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1426
.SS "Other substitutions (+)"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1427
There are several more transformations involving filenames, not strictly
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1428
related to the above but mentioned here for completeness.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1429
\fIAny\fR filename may be expanded to a full path when the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1430
\fBsymlinks\fR variable (q.v.) is set to `expand'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1431
Quoting prevents this expansion, and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1432
the \fInormalize-path\fR editor command does it on demand.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1433
The \fInormalize-command\fR editor command expands commands in PATH into
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1434
full paths on demand.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1435
Finally, \fIcd\fR and \fIpushd\fR interpret `\-' as the old working directory
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1436
(equivalent to the shell variable \fBowd\fR).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1437
This is not a substitution at all, but an abbreviation recognized by only
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1438
those commands.  Nonetheless, it too can be prevented by quoting.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1439
.SS Commands
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1440
The next three sections describe how the shell executes commands and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1441
deals with their input and output.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1442
.SS Simple commands, pipelines and sequences
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1443
A simple command is a sequence of words, the first of which specifies the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1444
command to be executed.  A series of simple commands joined by `|' characters
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1445
forms a pipeline.  The output of each command in a pipeline is connected to the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1446
input of the next.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1447
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1448
Simple commands and pipelines may be joined into sequences with `;', and will
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1449
be executed sequentially.  Commands and pipelines can also be joined into
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1450
sequences with `||' or `&&', indicating, as in the C language, that the second
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1451
is to be executed only if the first fails or succeeds respectively.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1452
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1453
A simple command, pipeline or sequence may be placed in parentheses, `()',
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1454
to form a simple command, which may in turn be a component of a pipeline or
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1455
sequence.  A command, pipeline or sequence can be executed
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1456
without waiting for it to terminate by following it with an `&'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1457
.SS "Builtin and non-builtin command execution"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1458
Builtin commands are executed within the shell.  If any component of a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1459
pipeline except the last is a builtin command, the pipeline is executed
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1460
in a subshell.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1461
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1462
Parenthesized commands are always executed in a subshell.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1463
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1464
(cd; pwd); pwd
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1465
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1466
thus prints the \fBhome\fR directory, leaving you where you were
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1467
(printing this after the home directory), while
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1468
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1469
cd; pwd
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1470
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1471
leaves you in the \fBhome\fR directory.  Parenthesized commands are most often
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1472
used to prevent \fIcd\fR from affecting the current shell.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1473
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1474
When a command to be executed is found not to be a builtin command the shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1475
attempts to execute the command via \fIexecve\fR(2).  Each word in the variable
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1476
\fBpath\fR names a directory in which the shell will look for the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1477
command.  If the shell is not given a \fB\-f\fR option, the shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1478
hashes the names in these directories into an internal table so that it will
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1479
try an \fIexecve\fR(2) in only a directory where there is a possibility that the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1480
command resides there.  This greatly speeds command location when a large
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1481
number of directories are present in the search path. This hashing mechanism is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1482
not used:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1483
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1484
.B 1.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1485
If hashing is turned explicitly off via \fIunhash\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1486
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1487
.B 2.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1488
If the shell was given a \fB\-f\fR argument.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1489
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1490
.B 3.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1491
For each directory component of \fBpath\fR which does not begin with a `/'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1492
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1493
.B 4.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1494
If the command contains a `/'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1495
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1496
In the above four cases the shell concatenates each component of the path
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1497
vector with the given command name to form a path name of a file which it
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1498
then attempts to execute it. If execution is successful, the search stops.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1499
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1500
If the file has execute permissions but is not an executable to the system
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1501
(i.e., it is neither an executable binary nor a script that specifies its
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1502
interpreter), then it is assumed to be a file containing shell commands and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1503
a new shell is spawned to read it.  The \fIshell\fR special alias may be set
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1504
to specify an interpreter other than the shell itself.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1505
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1506
On systems which do not understand the `#!' script interpreter convention
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1507
the shell may be compiled to emulate it; see the \fBversion\fR shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1508
variable\fR.  If so, the shell checks the first line of the file to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1509
see if it is of the form `#!\fIinterpreter\fR \fIarg\fR ...'.  If it is,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1510
the shell starts \fIinterpreter\fR with the given \fIarg\fRs and feeds the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1511
file to it on standard input.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1512
.SS Input/output
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1513
The standard input and standard output of a command may be redirected with the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1514
following syntax:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1515
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1516
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1517
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1518
< \fIname
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1519
Open file \fIname\fR (which is first variable, command and filename
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1520
expanded) as the standard input.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1521
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1522
<< \fIword
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1523
Read the shell input up to a line which is identical to \fIword\fR.  \fIword\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1524
is not subjected to variable, filename or command substitution, and each input
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1525
line is compared to \fIword\fR before any substitutions are done on this input
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1526
line.  Unless a quoting `\e', `"', `' or ``' appears in \fIword\fR variable and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1527
command substitution is performed on the intervening lines, allowing `\e' to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1528
quote `$', `\e' and ``'.  Commands which are substituted have all blanks, tabs,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1529
and newlines preserved, except for the final newline which is dropped.  The
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1530
resultant text is placed in an anonymous temporary file which is given to the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1531
command as standard input.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1532
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1533
> \fIname
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1534
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1535
>! \fIname
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1536
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1537
>& \fIname
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1538
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1539
>&! \fIname
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1540
The file \fIname\fR is used as standard output.  If the file does not exist
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1541
then it is created; if the file exists, it is truncated, its previous contents
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1542
being lost.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1543
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1544
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1545
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1546
If the shell variable \fBnoclobber\fR is set, then the file must not exist or be a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1547
character special file (e.g., a terminal or `/dev/null') or an error results.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1548
This helps prevent accidental destruction of files.  In this case the `!' forms
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1549
can be used to suppress this check.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1550
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1551
The forms involving `&' route the diagnostic output into the specified file as
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1552
well as the standard output.  \fIname\fR is expanded in the same way as `<'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1553
input filenames are.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1554
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1555
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1556
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1557
>> \fIname
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1558
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1559
>>& \fIname
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1560
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1561
>>! \fIname
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1562
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1563
>>&! \fIname
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1564
Like `>', but appends output to the end of \fIname\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1565
If the shell variable \fBnoclobber\fR is set, then it is an error for
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1566
the file \fInot\fR to exist, unless one of the `!' forms is given.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1567
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1568
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1569
A command receives the environment in which the shell was invoked as modified
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1570
by the input-output parameters and the presence of the command in a pipeline.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1571
Thus, unlike some previous shells, commands run from a file of shell commands
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1572
have no access to the text of the commands by default; rather they receive the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1573
original standard input of the shell.  The `<<' mechanism should be used to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1574
present inline data.  This permits shell command scripts to function as
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1575
components of pipelines and allows the shell to block read its input.  Note
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1576
that the default standard input for a command run detached is \fInot\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1577
the empty file \fI/dev/null\fR, but the original standard input of the shell.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1578
If this is a terminal and if the process attempts to read from the terminal,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1579
then the process will block and the user will be notified (see \fBJobs\fR).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1580
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1581
Diagnostic output may be directed through a pipe with the standard output.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1582
Simply use the form `|&' rather than just `|'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1583
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1584
The shell cannot presently redirect diagnostic output without also redirecting
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1585
standard output, but `(\fIcommand\fR > \fIoutput-file\fR) >& \fIerror-file\fR'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1586
is often an acceptable workaround.  Either \fIoutput-file\fR or
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1587
\fIerror-file\fR may be `/dev/tty' to send output to the terminal.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1588
.SS Features
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1589
Having described how the shell accepts, parses and executes
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1590
command lines, we now turn to a variety of its useful features.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1591
.SS "Control flow"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1592
The shell contains a number of commands which can be used to regulate the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1593
flow of control in command files (shell scripts) and (in limited but
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1594
useful ways) from terminal input.  These commands all operate by forcing the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1595
shell to reread or skip in its input and, due to the implementation,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1596
restrict the placement of some of the commands.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1597
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1598
The \fIforeach\fR, \fIswitch\fR, and \fIwhile\fR statements, as well as the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1599
\fIif-then-else\fR form of the \fIif\fR statement, require that the major
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1600
keywords appear in a single simple command on an input line as shown below.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1601
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1602
If the shell's input is not seekable, the shell buffers up input whenever
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1603
a loop is being read and performs seeks in this internal buffer to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1604
accomplish the rereading implied by the loop.  (To the extent that this
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1605
allows, backward \fIgoto\fRs will succeed on non-seekable inputs.)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1606
.SS Expressions
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1607
The \fIif\fR, \fIwhile\fR and \fIexit\fR builtin commands
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1608
use expressions with a common syntax.  The expressions can include any
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1609
of the operators described in the next three sections.  Note that the \fI@\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1610
builtin command (q.v.) has its own separate syntax.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1611
.SS "Logical, arithmetical and comparison operators"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1612
These operators are similar to those of C and have the same precedence.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1613
They include
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1614
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1615
||  &&  |  ^  &  ==  !=  =~  !~  <=  >=
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1616
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1617
<  > <<  >>  +  \-  *  /  %  !  ~  (  )
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1618
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1619
Here the precedence increases to the right, `==' `!=' `=~' and `!~', `<='
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1620
`>=' `<' and `>', `<<' and `>>', `+' and `\-', `*' `/' and `%' being, in
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1621
groups, at the same level.  The `==' `!=' `=~' and `!~' operators compare
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1622
their arguments as strings; all others operate on numbers.  The operators
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1623
`=~' and `!~' are like `!=' and `==' except that the right hand side is a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1624
glob-pattern (see \fBFilename substitution\fR) against which the left hand
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1625
operand is matched.  This reduces the need for use of the \fIswitch\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1626
builtin command in shell scripts when all that is really needed is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1627
pattern matching.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1628
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1629
Null or
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1630
missing arguments are considered `0'.  The results of all expressions are
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1631
strings, which represent decimal numbers.  It is important to note that
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1632
no two components of an expression can appear in the same word; except
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1633
when adjacent to components of expressions which are syntactically
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1634
significant to the parser (`&' `|' `<' `>' `(' `)') they should be
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1635
surrounded by spaces.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1636
.SS "Command exit status"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1637
Commands can be executed in expressions and their exit status
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1638
returned by enclosing them in braces (`{}').  Remember that the braces should
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1639
be separated from the words of the command by spaces.  Command executions
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1640
succeed, returning true, i.e., `1', if the command exits with status 0,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1641
otherwise they fail, returning false, i.e., `0'.  If more detailed status
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1642
information is required then the command should be executed outside of an
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1643
expression and the \fBstatus\fR shell variable examined.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1644
.SS "File inquiry operators"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1645
Some of these operators perform true/false tests on files and related
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1646
objects.  They are of the form \fB\-\fIop file\fR, where \fIop\fR is one of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1647
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1648
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1649
.RS +4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1650
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1651
.B r
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1652
Read access
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1653
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1654
.B w
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1655
Write access
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1656
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1657
.B x
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1658
Execute access
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1659
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1660
.B X
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1661
Executable in the path or shell builtin, e.g., `\-X ls' and `\-X ls\-F' are
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1662
generally true, but `\-X /bin/ls' is not (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1663
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1664
.B e
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1665
Existence
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1666
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1667
.B o
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1668
Ownership
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1669
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1670
.B z
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1671
Zero size
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1672
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1673
.B s
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1674
Non-zero size (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1675
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1676
.B f
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1677
Plain file
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1678
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1679
.B d
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1680
Directory
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1681
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1682
.B l
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1683
Symbolic link (+) *
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1684
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1685
.B b
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1686
Block special file (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1687
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1688
.B c
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1689
Character special file (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1690
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1691
.B p
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1692
Named pipe (fifo) (+) *
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1693
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1694
.B S
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1695
Socket special file (+) *
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1696
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1697
.B u
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1698
Set-user-ID bit is set (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1699
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1700
.B g
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1701
Set-group-ID bit is set (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1702
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1703
.B k
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1704
Sticky bit is set (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1705
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1706
.B t
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1707
\fIfile\fR (which must be a digit) is an open file descriptor
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1708
for a terminal device (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1709
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1710
.B R
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1711
Has been migrated (convex only) (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1712
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1713
.B L
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1714
Applies subsequent operators in a multiple-operator test to a symbolic link
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1715
rather than to the file to which the link points (+) *
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1716
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1717
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1718
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1719
\fIfile\fR is command and filename expanded and then tested to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1720
see if it has the specified relationship to the real user.  If \fIfile\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1721
does not exist or is inaccessible or, for the operators indicated by `*',
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1722
if the specified file type does not exist on the current system,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1723
then all enquiries return false, i.e., `0'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1724
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1725
These operators may be combined for conciseness: `\-\fIxy file\fR' is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1726
equivalent to `\-\fIx file\fR && \-\fIy file\fR'.  (+) For example, `\-fx' is true
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1727
(returns `1') for plain executable files, but not for directories.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1728
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1729
\fBL\fR may be used in a multiple-operator test to apply subsequent operators
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1730
to a symbolic link rather than to the file to which the link points.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1731
For example, `\-lLo' is true for links owned by the invoking user.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1732
\fBLr\fR, \fBLw\fR and \fBLx\fR are always true for links and false for
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1733
non-links.  \fBL\fR has a different meaning when it is the last operator
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1734
in a multiple-operator test; see below.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1735
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1736
It is possible but not useful, and sometimes misleading, to combine operators
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1737
which expect \fIfile\fR to be a file with operators which do not,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1738
(e.g., \fBX\fR and \fBt\fR).  Following \fBL\fR with a non-file operator
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1739
can lead to particularly strange results.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1740
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1741
Other operators return other information, i.e., not just `0' or `1'.  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1742
They have the same format as before; \fIop\fR may be one of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1743
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1744
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1745
.RS +4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1746
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1747
.B A
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1748
Last file access time, as the number of seconds since the epoch
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1749
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1750
.B A:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1751
Like \fBA\fR, but in timestamp format, e.g., `Fri May 14 16:36:10 1993'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1752
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1753
.B M
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1754
Last file modification time
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1755
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1756
.B M:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1757
Like \fBM\fR, but in timestamp format
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1758
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1759
.B C
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1760
Last inode modification time
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1761
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1762
.B C:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1763
Like \fBC\fR, but in timestamp format
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1764
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1765
.B D
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1766
Device number
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1767
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1768
.B I
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1769
Inode number
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1770
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1771
.B F
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1772
Composite \fBf\fRile identifier, in the form \fIdevice\fR:\fIinode\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1773
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1774
.B L
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1775
The name of the file pointed to by a symbolic link
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1776
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1777
.B N
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1778
Number of (hard) links
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1779
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1780
.B P
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1781
Permissions, in octal, without leading zero
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1782
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1783
.B P:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1784
Like \fBP\fR, with leading zero
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1785
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1786
.B P\fImode
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1787
Equivalent to `\-P \fIfile\fR & \fImode\fR', e.g., `\-P22 \fIfile\fR' returns
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1788
`22' if \fIfile\fR is writable by group and other, `20' if by group only,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1789
and `0' if by neither
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1790
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1791
.B P\fImode\fB:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1792
Like \fBP\fImode\fR, with leading zero
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1793
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1794
.B U
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1795
Numeric userid
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1796
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1797
.B U:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1798
Username, or the numeric userid if the username is unknown
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1799
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1800
.B G
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1801
Numeric groupid
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1802
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1803
.B G:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1804
Groupname, or the numeric groupid if the groupname is unknown
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1805
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1806
.B Z
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1807
Size, in bytes
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1808
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1809
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1810
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1811
Only one of these operators may appear in a multiple-operator test, and it
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1812
must be the last.  Note that \fBL\fR has a different meaning at the end of and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1813
elsewhere in a multiple-operator test.  Because `0' is a valid return value
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1814
for many of these operators, they do not return `0' when they fail: most
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1815
return `\-1', and \fBF\fR returns `:'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1816
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1817
If the shell is compiled with POSIX defined (see the \fBversion\fR shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1818
variable), the result of a file inquiry is based on the permission bits of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1819
the file and not on the result of the \fIaccess\fR(2) system call.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1820
For example, if one tests a file with \fB\-w\fR whose permissions would
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1821
ordinarily allow writing but which is on a file system mounted read-only,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1822
the test will succeed in a POSIX shell but fail in a non-POSIX shell.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1823
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1824
File inquiry operators can also be evaluated with the \fIfiletest\fR builtin
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1825
command (q.v.) (+).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1826
.SS Jobs
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1827
The shell associates a \fIjob\fR with each pipeline.  It keeps a table of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1828
current jobs, printed by the \fIjobs\fR command, and assigns them small integer
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1829
numbers.  When a job is started asynchronously with `&', the shell prints a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1830
line which looks like
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1831
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1832
[1] 1234
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1833
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1834
indicating that the job which was started asynchronously was job number 1 and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1835
had one (top-level) process, whose process id was 1234.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1836
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1837
If you are running a job and wish to do something else you may hit the suspend
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1838
key (usually `^Z'),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1839
which sends a STOP signal to the current job.  The shell will then normally
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1840
indicate that the job has been `Suspended' and print another prompt.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1841
If the \fBlistjobs\fR shell variable is set, all jobs will be listed
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1842
like the \fIjobs\fR builtin command; if it is set to `long' the listing will
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1843
be in long format, like `jobs \-l'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1844
You can then manipulate the state of the suspended job.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1845
You can put it in the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1846
``background'' with the \fIbg\fR command or run some other commands and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1847
eventually bring the job back into the ``foreground'' with \fIfg\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1848
(See also the \fIrun-fg-editor\fR editor command.)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1849
A `^Z' takes effect immediately and is like an interrupt
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1850
in that pending output and unread input are discarded when it is typed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1851
The \fIwait\fR builtin command causes the shell to wait for all background
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1852
jobs to complete.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1853
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1854
The `^]' key sends a delayed suspend signal, which does not generate a STOP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1855
signal until a program attempts to \fIread\fR(2) it, to the current job.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1856
This can usefully be typed ahead when you have prepared some commands for a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1857
job which you wish to stop after it has read them.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1858
The `^Y' key performs this function in \fIcsh\fR(1); in \fItcsh\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1859
`^Y' is an editing command.  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1860
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1861
A job being run in the background stops if it tries to read from the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1862
terminal.  Background jobs are normally allowed to produce output, but this can
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1863
be disabled by giving the command `stty tostop'.  If you set this tty option,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1864
then background jobs will stop when they try to produce output like they do
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1865
when they try to read input.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1866
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1867
There are several ways to refer to jobs in the shell.  The character `%'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1868
introduces a job name.  If you wish to refer to job number 1, you can name it
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1869
as `%1'.  Just naming a job brings it to the foreground; thus `%1' is a synonym
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1870
for `fg %1', bringing job 1 back into the foreground.  Similarly, saying `%1 &'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1871
resumes job 1 in the background, just like `bg %1'.  A job can also be named
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1872
by an unambiguous prefix of the string typed in to start it: `%ex' would
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1873
normally restart a suspended \fIex\fR(1) job, if there were only one suspended
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1874
job whose name began with the string `ex'.  It is also possible to say
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1875
`%?\fIstring\fR' to specify a job whose text contains \fIstring\fR, if there
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1876
is only one such job.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1877
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1878
The shell maintains a notion of the current and previous jobs.  In output
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1879
pertaining to jobs, the current job is marked with a `+' and the previous job
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1880
with a `\-'.  The abbreviations `%+', `%', and (by analogy with the syntax of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1881
the \fIhistory\fR mechanism) `%%' all refer to the current job, and `%\-' refers
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1882
to the previous job.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1883
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1884
The job control mechanism requires that the \fIstty\fR(1) option `new' be set
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1885
on some systems.  It is an artifact from a `new' implementation of the tty
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1886
driver which allows generation of interrupt characters from the keyboard to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1887
tell jobs to stop.  See \fIstty\fR(1) and the \fIsetty\fR builtin command for
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1888
details on setting options in the new tty driver.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1889
.SS "Status reporting"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1890
The shell learns immediately whenever a process changes state.  It normally
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1891
informs you whenever a job becomes blocked so that no further progress is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1892
possible, but only right before it prints a prompt.  This is done so that it
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1893
does not otherwise disturb your work.  If, however, you set the shell variable
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1894
\fBnotify\fR, the shell will notify you immediately of changes of status in
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1895
background jobs.  There is also a shell command \fInotify\fR which marks a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1896
single process so that its status changes will be immediately reported.  By
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1897
default \fInotify\fR marks the current process; simply say `notify' after
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1898
starting a background job to mark it.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1899
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1900
When you try to leave the shell while jobs are stopped, you will be
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1901
warned that `There are suspended jobs.' You may use the \fIjobs\fR command to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1902
see what they are.  If you do this or immediately try to exit again, the shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1903
will not warn you a second time, and the suspended jobs will be terminated.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1904
.SS "Automatic, periodic and timed events (+)"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1905
There are various ways to run commands and take other actions automatically
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1906
at various times in the ``life cycle'' of the shell.  They are summarized here,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1907
and described in detail under the appropriate \fBBuiltin commands\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1908
\fBSpecial shell variables\fR and \fBSpecial aliases\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1909
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1910
The \fIsched\fR builtin command puts commands in a scheduled-event list,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1911
to be executed by the shell at a given time.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1912
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1913
The \fIbeepcmd\fR, \fIcwdcmd\fR, \fIperiodic\fR, \fIprecmd\fR, \fIpostcmd\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1914
and \fIjobcmd\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1915
\fBSpecial aliases\fR can be set, respectively, to execute commands when the shell wants
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1916
to ring the bell, when the working directory changes, every \fBtperiod\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1917
minutes, before each prompt, before each command gets executed, after each
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1918
command gets executed, and when a job is started or is brought into the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1919
foreground.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1920
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1921
The \fBautologout\fR shell variable can be set to log out or lock the shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1922
after a given number of minutes of inactivity.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1923
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1924
The \fBmail\fR shell variable can be set to check for new mail periodically.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1925
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1926
The \fBprintexitvalue\fR shell variable can be set to print the exit status
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1927
of commands which exit with a status other than zero.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1928
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1929
The \fBrmstar\fR shell variable can be set to ask the user, when `rm *' is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1930
typed, if that is really what was meant.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1931
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1932
The \fBtime\fR shell variable can be set to execute the \fItime\fR builtin
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1933
command after the completion of any process that takes more than a given
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1934
number of CPU seconds.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1935
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1936
The \fBwatch\fR and \fBwho\fR shell variables can be set to report when
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1937
selected users log in or out, and the \fIlog\fR builtin command reports
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1938
on those users at any time.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1939
.SS "Native Language System support (+)"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1940
The shell is eight bit clean
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1941
(if so compiled; see the \fBversion\fR shell variable)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1942
and thus supports character sets needing this capability.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1943
NLS support differs depending on whether or not
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1944
the shell was compiled to use the system's NLS (again, see \fBversion\fR).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1945
In either case, 7-bit ASCII is the default character code
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1946
(e.g., the classification of which characters are printable) and sorting,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1947
and changing the \fBLANG\fR or \fBLC_CTYPE\fR environment variables
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1948
causes a check for possible changes in these respects.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1949
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1950
When using the system's NLS, the \fIsetlocale\fR(3C) function is called
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1951
to determine appropriate character code/classification and sorting
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1952
(e.g., a 'en_CA.UTF-8' would yield "UTF-8" as a character code).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1953
This function typically examines the \fBLANG\fR and \fBLC_CTYPE\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1954
environment variables; refer to the system documentation for further details.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1955
When not using the system's NLS, the shell simulates it by assuming that the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1956
ISO 8859-1 character set is used
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1957
whenever either of the \fBLANG\fR and \fBLC_CTYPE\fR variables are set, regardless of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1958
their values.  Sorting is not affected for the simulated NLS.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1959
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1960
In addition, with both real and simulated NLS, all printable
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1961
characters in the range \e200\-\e377, i.e., those that have
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1962
M-\fIchar\fR bindings, are automatically rebound to \fIself-insert-command\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1963
The corresponding binding for the escape-\fIchar\fR sequence, if any, is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1964
left alone.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1965
These characters are not rebound if the \fBNOREBIND\fR environment variable
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1966
is set.  This may be useful for the simulated NLS or a primitive real NLS
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1967
which assumes full ISO 8859-1.  Otherwise, all M-\fIchar\fR bindings in the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1968
range \e240\-\e377 are effectively undone.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1969
Explicitly rebinding the relevant keys with \fIbindkey\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1970
is of course still possible.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1971
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1972
Unknown characters (i.e., those that are neither printable nor control
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1973
characters) are printed in the format \ennn.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1974
If the tty is not in 8 bit mode, other 8 bit characters are printed by
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1975
converting them to ASCII and using standout mode.  The shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1976
never changes the 7/8 bit mode of the tty and tracks user-initiated
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1977
changes of 7/8 bit mode.  NLS users (or, for that matter, those who want to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1978
use a meta key) may need to explicitly set
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1979
the tty in 8 bit mode through the appropriate \fIstty\fR(1)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1980
command in, e.g., the \fI~/.login\fR file.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1981
.SS "OS variant support (+)"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1982
A number of new builtin commands are provided to support features in
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1983
particular operating systems.  All are described in detail in the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1984
\fBBuiltin commands\fR section.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1985
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1986
On systems that support TCF (aix-ibm370, aix-ps2),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1987
\fIgetspath\fR and \fIsetspath\fR get and set the system execution path,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1988
\fIgetxvers\fR and \fIsetxvers\fR get and set the experimental version prefix
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1989
and \fImigrate\fR migrates processes between sites.  The \fIjobs\fR builtin
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1990
prints the site on which each job is executing.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1991
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1992
Under BS2000, \fIbs2cmd\fR executes commands of the underlying BS2000/OSD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1993
operating system.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1994
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1995
Under Domain/OS, \fIinlib\fR adds shared libraries to the current environment,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1996
\fIrootnode\fR changes the rootnode and \fIver\fR changes the systype.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1997
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1998
Under Mach, \fIsetpath\fR is equivalent to Mach's \fIsetpath\fR(1).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  1999
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2000
Under Masscomp/RTU and Harris CX/UX, \fIuniverse\fR sets the universe.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2001
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2002
Under Harris CX/UX, \fIucb\fR or \fIatt\fR runs a command under the specified
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2003
universe.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2004
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2005
Under Convex/OS, \fIwarp\fR prints or sets the universe.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2006
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2007
The \fBVENDOR\fR, \fBOSTYPE\fR and \fBMACHTYPE\fR environment variables
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2008
indicate respectively the vendor, operating system and machine type
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2009
(microprocessor class or machine model) of the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2010
system on which the shell thinks it is running.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2011
These are particularly useful when sharing one's home directory between several
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2012
types of machines; one can, for example,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2013
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2014
set path = (~/bin.$MACHTYPE /usr/ucb /bin /usr/bin .)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2015
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2016
in one's \fI~/.login\fR and put executables compiled for each machine in the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2017
appropriate directory.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2018
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2019
The \fBversion\fR shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2020
variable indicates what options were chosen when the shell was compiled.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2021
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2022
Note also the \fInewgrp\fR builtin, the \fBafsuser\fR and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2023
\fBecho_style\fR shell variables and the system-dependent locations of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2024
the shell's input files (see \fBFILES\fR).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2025
.SS "Signal handling"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2026
Login shells ignore interrupts when reading the file \fI~/.logout\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2027
The shell ignores quit signals unless started with \fB\-q\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2028
Login shells catch the terminate signal, but non-login shells inherit the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2029
terminate behavior from their parents.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2030
Other signals have the values which the shell inherited from its parent.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2031
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2032
In shell scripts, the shell's handling of interrupt and terminate signals
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2033
can be controlled with \fIonintr\fR, and its handling of hangups can be
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2034
controlled with \fIhup\fR and \fInohup\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2035
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2036
The shell exits on a hangup (see also the \fBlogout\fR shell variable).  By
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2037
default, the shell's children do too, but the shell does not send them a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2038
hangup when it exits.  \fIhup\fR arranges for the shell to send a hangup to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2039
a child when it exits, and \fInohup\fR sets a child to ignore hangups.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2040
.SS "Terminal management (+)"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2041
The shell uses three different sets of terminal (``tty'') modes:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2042
`edit', used when editing, `quote', used when quoting literal characters,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2043
and `execute', used when executing commands.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2044
The shell holds some settings in each mode constant, so commands which leave
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2045
the tty in a confused state do not interfere with the shell.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2046
The shell also matches changes in the speed and padding of the tty.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2047
The list of tty modes that are kept constant
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2048
can be examined and modified with the \fIsetty\fR builtin.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2049
Note that although the editor uses CBREAK mode (or its equivalent),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2050
it takes typed-ahead characters anyway.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2051
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2052
The \fIechotc\fR, \fIsettc\fR and \fItelltc\fR commands can be used to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2053
manipulate and debug terminal capabilities from the command line.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2054
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2055
On systems that support SIGWINCH or SIGWINDOW, the shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2056
adapts to window resizing automatically and adjusts the environment
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2057
variables \fBLINES\fR and \fBCOLUMNS\fR if set.  If the environment
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2058
variable \fBTERMCAP\fR contains li# and co# fields, the shell adjusts
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2059
them to reflect the new window size.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2060
.SH REFERENCE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2061
The next sections of this manual describe all of the available
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2062
\fBBuiltin commands\fR, \fBSpecial aliases\fR and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2063
\fBSpecial shell variables\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2064
.SS "Builtin commands"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2065
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2066
.B %\fIjob
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2067
A synonym for the \fIfg\fR builtin command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2068
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2069
.B %\fIjob \fB&
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2070
A synonym for the \fIbg\fR builtin command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2071
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2072
.B :
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2073
Does nothing, successfully.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2074
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2075
.B @
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2076
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2077
.B @ \fIname\fB = \fIexpr
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2078
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2079
.B @ \fIname\fR[\fIindex\fR]\fB = \fIexpr
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2080
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2081
.B @ \fIname\fB++\fR|\fB--
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2082
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2083
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2084
.B @ \fIname\fR[\fIindex\fR]\fB++\fR|\fB--
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2085
The first form prints the values of all shell variables.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2086
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2087
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2088
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2089
The second form assigns the value of \fIexpr\fR to \fIname\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2090
The third form assigns the value of \fIexpr\fR to the \fIindex\fR'th
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2091
component of \fIname\fR; both \fIname\fR and its \fIindex\fR'th component
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2092
must already exist.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2093
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2094
\fIexpr\fR may contain the operators `*', `+', etc., as in C.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2095
If \fIexpr\fR contains `<', `>', `&' or `' then at least that part of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2096
\fIexpr\fR must be placed within `()'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2097
Note that the syntax of \fIexpr\fR has nothing to do with that described
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2098
under \fBExpressions\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2099
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2100
The fourth and fifth forms increment (`++') or decrement (`\-\-') \fIname\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2101
or its \fIindex\fR'th component.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2102
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2103
The space between `@' and \fIname\fR is required.  The spaces between
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2104
\fIname\fR and `=' and between `=' and \fIexpr\fR are optional.  Components of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2105
\fIexpr\fR must be separated by spaces.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2106
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2107
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2108
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2109
.B alias \fR[\fIname \fR[\fIwordlist\fR]]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2110
Without arguments, prints all aliases.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2111
With \fIname\fR, prints the alias for name.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2112
With \fIname\fR and \fIwordlist\fR, assigns
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2113
\fIwordlist\fR as the alias of \fIname\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2114
\fIwordlist\fR is command and filename substituted.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2115
\fIname\fR may not be `alias' or `unalias'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2116
See also the \fIunalias\fR builtin command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2117
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2118
.B alloc
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2119
Shows the amount of dynamic memory acquired, broken down into used and free
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2120
memory.  With an argument shows the number of free and used blocks in each size
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2121
category.  The categories start at size 8 and double at each step.  This
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2122
command's output may vary across system types, because systems other than the VAX
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2123
may use a different memory allocator.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2124
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2125
.B bg \fR[\fB%\fIjob\fR ...]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2126
Puts the specified jobs (or, without arguments, the current job)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2127
into the background, continuing each if it is stopped.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2128
\fIjob\fR may be a number, a string, `', `%', `+' or `\-' as described
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2129
under \fBJobs\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2130
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2131
.B bindkey \fR[\fB\-l\fR|\fB\-d\fR|\fB\-e\fR|\fB\-v\fR|\fB\-u\fR] (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2132
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2133
\fBbindkey \fR[\fB\-a\fR] [\fB\-b\fR] [\fB\-k\fR] [\fB\-r\fR] [\fB\-\-\fR] \fIkey \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2134
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2135
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2136
\fBbindkey \fR[\fB\-a\fR] [\fB\-b\fR] [\fB\-k\fR] [\fB\-c\fR|\fB\-s\fR] [\fB\-\-\fR] \fIkey command \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2137
.\" .B macro can't take too many words, so I used \fB in the previous tags
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2138
Without options, the first form lists all bound keys and the editor command to which each is bound,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2139
the second form lists the editor command to which \fIkey\fR is bound and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2140
the third form binds the editor command \fIcommand\fR to \fIkey\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2141
Options include:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2142
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2143
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2144
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2145
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2146
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2147
.B \-l
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2148
Lists all editor commands and a short description of each.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2149
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2150
.B \-d
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2151
Binds all keys to the standard bindings for the default editor.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2152
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2153
.B \-e
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2154
Binds all keys to the standard GNU Emacs-like bindings.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2155
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2156
.B \-v
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2157
Binds all keys to the standard \fIvi\fR(1)-like bindings.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2158
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2159
.B \-a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2160
Lists or changes key-bindings in the alternative key map.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2161
This is the key map used in \fIvi\fR command mode.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2162
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2163
.B \-b
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2164
\fIkey\fR is interpreted as
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2165
a control character written ^\fIcharacter\fR (e.g., `^A') or
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2166
C-\fIcharacter\fR (e.g., `C-A'),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2167
a meta character written M-\fIcharacter\fR (e.g., `M-A'),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2168
a function key written F-\fIstring\fR (e.g., `F-string'),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2169
or an extended prefix key written X-\fIcharacter\fR (e.g., `X-A').
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2170
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2171
.B \-k
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2172
\fIkey\fR is interpreted as a symbolic arrow key name, which may be one of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2173
`down', `up', `left' or `right'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2174
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2175
.B \-r
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2176
Removes \fIkey\fR's binding.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2177
Be careful: `bindkey \-r' does \fInot\fR bind \fIkey\fR to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2178
\fIself-insert-command\fR (q.v.), it unbinds \fIkey\fR completely.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2179
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2180
.B \-c
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2181
\fIcommand\fR is interpreted as a builtin or external command instead of an
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2182
editor command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2183
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2184
.B \-s
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2185
\fIcommand\fR is taken as a literal string and treated as terminal input
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2186
when \fIkey\fR is typed.  Bound keys in \fIcommand\fR are themselves
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2187
reinterpreted, and this continues for ten levels of interpretation.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2188
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2189
.B \-\-
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2190
Forces a break from option processing, so the next word is taken as \fIkey\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2191
even if it begins with '\-'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2192
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2193
.B \-u \fR(or any invalid option)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2194
Prints a usage message.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2195
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2196
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2197
\fIkey\fR may be a single character or a string.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2198
If a command is bound to a string, the first character of the string is bound to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2199
\fIsequence-lead-in\fR and the entire string is bound to the command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2200
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2201
Control characters in \fIkey\fR can be literal (they can be typed by preceding
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2202
them with the editor command \fIquoted-insert\fR, normally bound to `^V') or
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2203
written caret-character style, e.g., `^A'.  Delete is written `^?'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2204
(caret-question mark).  \fIkey\fR and \fIcommand\fR can contain backslashed
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2205
escape sequences (in the style of System V \fIecho\fR(1)) as follows:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2206
.RS +4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2207
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2208
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2209
.B \ea
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2210
Bell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2211
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2212
.B \eb
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2213
Backspace
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2214
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2215
.B \ee
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2216
Escape
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2217
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2218
.B \ef
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2219
Form feed
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2220
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2221
.B \en
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2222
Newline
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2223
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2224
.B \er
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2225
Carriage return
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2226
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2227
.B \et
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2228
Horizontal tab
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2229
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2230
.B \ev
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2231
Vertical tab
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2232
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2233
.B \e\fInnn
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2234
The ASCII character corresponding to the octal number \fInnn\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2235
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2236
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2237
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2238
`\e' nullifies the special meaning of the following character, if it has
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2239
any, notably `\\' and `^'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2240
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2241
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2242
.B bs2cmd \fIbs2000-command\fR (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2243
Passes \fIbs2000-command\fR to the BS2000 command interpreter for
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2244
execution. Only non-interactive commands can be executed, and it is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2245
not possible to execute any command that would overlay the image
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2246
of the current process, like /EXECUTE or /CALL-PROCEDURE. (BS2000 only)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2247
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2248
.B break
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2249
Causes execution to resume after the \fIend\fR of the nearest
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2250
enclosing \fIforeach\fR or \fIwhile\fR.  The remaining commands on the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2251
current line are executed.  Multi-level breaks are thus
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2252
possible by writing them all on one line.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2253
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2254
.B breaksw
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2255
Causes a break from a \fIswitch\fR, resuming after the \fIendsw\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2256
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2257
.B builtins \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2258
Prints the names of all builtin commands.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2259
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2260
.B bye \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2261
A synonym for the \fIlogout\fR builtin command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2262
Available only if the shell was so compiled;
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2263
see the \fBversion\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2264
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2265
.B case \fIlabel\fB:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2266
A label in a \fIswitch\fR statement as discussed below.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2267
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2268
.B cd \fR[\fB\-p\fR] [\fB\-l\fR] [\fB\-n\fR|\fB\-v\fR] [\fIname\fR]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2269
If a directory \fIname\fR is given, changes the shell's working directory
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2270
to \fIname\fR.  If not, changes to \fBhome\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2271
If \fIname\fR is `\-' it is interpreted as the previous working directory
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2272
(see \fBOther substitutions\fR).  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2273
If \fIname\fR is not a subdirectory of the current directory
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2274
(and does not begin with `/', `./' or `../'), each component of the variable
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2275
\fBcdpath\fR is checked to see if it has a subdirectory \fIname\fR.  Finally, if
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2276
all else fails but \fIname\fR is a shell variable whose value
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2277
begins with `/', then this is tried to see if it is a directory.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2278
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2279
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2280
With \fB\-p\fR, prints the final directory stack, just like \fIdirs\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2281
The \fB\-l\fR, \fB\-n\fR and \fB\-v\fR flags have the same effect on \fIcd\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2282
as on \fIdirs\fR, and they imply \fB\-p\fR.  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2283
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2284
See also the \fBimplicitcd\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2285
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2286
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2287
.B chdir
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2288
A synonym for the \fIcd\fR builtin command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2289
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2290
.B complete \fR[\fIcommand\fR [\fIword\fB/\fIpattern\fB/\fIlist\fR[\fB:\fIselect\fR]\fB/\fR[[\fIsuffix\fR]\fB/\fR] ...]] (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2291
Without arguments, lists all completions.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2292
With \fIcommand\fR, lists completions for \fIcommand\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2293
With \fIcommand\fR and \fIword\fR etc., defines completions.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2294
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2295
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2296
\fIcommand\fR may be a full command name or a glob-pattern
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2297
(see \fBFilename substitution\fR).  It can begin with `\-' to indicate that
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2298
completion should be used only when \fIcommand\fR is ambiguous.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2299
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2300
\fIword\fR specifies which word relative to the current word
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2301
is to be completed, and may be one of the following:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2302
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2303
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2304
.RS +4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2305
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2306
.B c
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2307
Current-word completion.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2308
\fIpattern\fR is a glob-pattern which must match the beginning of the current word on
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2309
the command line.  \fIpattern\fR is ignored when completing the current word.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2310
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2311
.B C
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2312
Like \fBc\fR, but includes \fIpattern\fR when completing the current word.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2313
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2314
.B n
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2315
Next-word completion.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2316
\fIpattern\fR is a glob-pattern which must match the beginning of the previous word on
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2317
the command line.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2318
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2319
.B N
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2320
Like \fBn\fR, but must match the beginning of the word two before the current word.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2321
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2322
.B p
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2323
Position-dependent completion.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2324
\fIpattern\fR is a numeric range, with the same syntax used to index shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2325
variables, which must include the current word.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2326
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2327
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2328
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2329
\fIlist\fR, the list of possible completions, may be one of the following:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2330
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2331
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2332
.RS +4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2333
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2334
.B a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2335
Aliases
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2336
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2337
.B b
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2338
Bindings (editor commands)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2339
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2340
.B c
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2341
Commands (builtin or external commands)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2342
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2343
.B C
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2344
External commands which begin with the supplied path prefix
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2345
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2346
.B d
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2347
Directories
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2348
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2349
.B D
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2350
Directories which begin with the supplied path prefix
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2351
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2352
.B e
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2353
Environment variables
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2354
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2355
.B f
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2356
Filenames
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2357
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2358
.B F
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2359
Filenames which begin with the supplied path prefix
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2360
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2361
.B g
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2362
Groupnames
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2363
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2364
.B j
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2365
Jobs
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2366
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2367
.B l
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2368
Limits
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2369
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2370
.B n
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2371
Nothing
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2372
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2373
.B s
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2374
Shell variables
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2375
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2376
.B S
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2377
Signals
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2378
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2379
.B t
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2380
Plain (``text'') files
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2381
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2382
.B T
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2383
Plain (``text'') files which begin with the supplied path prefix
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2384
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2385
.B v
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2386
Any variables
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2387
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2388
.B u
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2389
Usernames
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2390
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2391
.B x
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2392
Like \fBn\fR, but prints \fIselect\fR when \fIlist-choices\fR is used.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2393
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2394
.B X
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2395
Completions
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2396
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2397
$\fIvar\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2398
Words from the variable \fIvar\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2399
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2400
(...)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2401
Words from the given list
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2402
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2403
`...`
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2404
Words from the output of command
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2405
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2406
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2407
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2408
\fIselect\fR is an optional glob-pattern.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2409
If given, words from only \fIlist\fR that match \fIselect\fR are considered
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2410
and the \fBfignore\fR shell variable is ignored.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2411
The last three types of completion may not have a \fIselect\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2412
pattern, and \fBx\fR uses \fIselect\fR as an explanatory message when
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2413
the \fIlist-choices\fR editor command is used.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2414
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2415
\fIsuffix\fR is a single character to be appended to a successful
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2416
completion.  If null, no character is appended.  If omitted (in which
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2417
case the fourth delimiter can also be omitted), a slash is appended to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2418
directories and a space to other words.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2419
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2420
\fIcommand\fR invoked from `...` version has additional environment
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2421
variable set, the variable name is \%\fBCOMMAND_LINE\fR\% and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2422
contains (as its name indicates) contents of the current (already
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2423
typed in) command line. One can examine and use contents of the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2424
\%\fBCOMMAND_LINE\fR\% variable in her custom script to build more
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2425
sophisticated completions (see completion for svn(1) included in
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2426
this package).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2427
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2428
Now for some examples.  Some commands take only directories as arguments,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2429
so there's no point completing plain files.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2430
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2431
> complete cd 'p/1/d/'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2432
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2433
completes only the first word following `cd' (`p/1') with a directory.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2434
\fBp\fR-type completion can also be used to narrow down command completion:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2435
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2436
> co[^D]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2437
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2438
complete compress
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2439
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2440
> complete \-co* 'p/0/(compress)/'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2441
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2442
> co[^D]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2443
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2444
> compress
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2445
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2446
This completion completes commands (words in position 0, `p/0')
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2447
which begin with `co' (thus matching `co*') to `compress' (the only
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2448
word in the list).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2449
The leading `\-' indicates that this completion is to be used with only
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2450
ambiguous commands.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2451
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2452
> complete find 'n/\-user/u/'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2453
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2454
is an example of \fBn\fR-type completion.  Any word following `find' and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2455
immediately following `\-user' is completed from the list of users.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2456
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2457
> complete cc 'c/\-I/d/'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2458
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2459
demonstrates \fBc\fR-type completion.  Any word following `cc' and beginning
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2460
with `\-I' is completed as a directory.  `\-I' is not taken as part of the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2461
directory because we used lowercase \fBc\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2462
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2463
Different \fIlist\fRs are useful with different commands.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2464
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2465
> complete alias 'p/1/a/'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2466
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2467
> complete man 'p/*/c/'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2468
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2469
> complete set 'p/1/s/'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2470
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2471
> complete true 'p/1/x:Truth has no options./'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2472
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2473
These complete words following `alias' with aliases, `man' with commands,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2474
and `set' with shell variables.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2475
`true' doesn't have any options, so \fBx\fR does nothing when completion
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2476
is attempted and prints `Truth has no options.' when completion choices are listed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2477
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2478
Note that the \fIman\fR example, and several other examples below, could
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2479
just as well have used 'c/*' or 'n/*' as 'p/*'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2480
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2481
Words can be completed from a variable evaluated at completion time,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2482
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2483
> complete ftp 'p/1/$hostnames/'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2484
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2485
> set hostnames = (rtfm.mit.edu tesla.ee.cornell.edu)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2486
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2487
> ftp [^D]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2488
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2489
rtfm.mit.edu tesla.ee.cornell.edu
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2490
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2491
> ftp [^C]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2492
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2493
> set hostnames = (rtfm.mit.edu tesla.ee.cornell.edu uunet.uu.net)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2494
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2495
> ftp [^D]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2496
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2497
rtfm.mit.edu tesla.ee.cornell.edu uunet.uu.net
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2498
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2499
or from a command run at completion time:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2500
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2501
> complete kill 'p/*/`ps | awk \\{print\\ \\$1\\}`/'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2502
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2503
> kill \-9 [^D]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2504
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2505
23113 23377 23380 23406 23429 23529 23530 PID
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2506
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2507
Note that the \fIcomplete\fR command does not itself quote its arguments,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2508
so the braces, space and `$' in `{print $1}' must be quoted explicitly.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2509
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2510
One command can have multiple completions:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2511
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2512
> complete dbx 'p/2/(core)/' 'p/*/c/'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2513
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2514
completes the second argument to `dbx' with the word `core' and all other
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2515
arguments with commands.  Note that the positional completion is specified
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2516
before the next-word completion.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2517
Because completions are evaluated from left to right, if
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2518
the next-word completion were specified first it would always match
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2519
and the positional completion would never be executed.  This is a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2520
common mistake when defining a completion.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2521
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2522
The \fIselect\fR pattern is useful when a command takes files with only
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2523
particular forms as arguments.  For example,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2524
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2525
> complete cc 'p/*/f:*.[cao]/'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2526
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2527
completes `cc' arguments to files ending in only `.c', `.a', or `.o'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2528
\fIselect\fR can also exclude files, using negation of a glob-pattern as
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2529
described under \fBFilename substitution\fR.  One might use
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2530
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2531
> complete rm 'p/*/f:^*.{c,h,cc,C,tex,1,man,l,y}/'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2532
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2533
to exclude precious source code from `rm' completion.  Of course, one
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2534
could still type excluded names manually or override the completion
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2535
mechanism using the \fIcomplete-word-raw\fR or \fIlist-choices-raw\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2536
editor commands (q.v.).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2537
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2538
The `C', `D', `F' and `T' \fIlist\fRs are like `c', `d', `f' and `t'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2539
respectively, but they use the \fIselect\fR argument in a different way: to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2540
restrict completion to files beginning with a particular path prefix.  For
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2541
example, the Elm mail program uses `=' as an abbreviation for one's mail
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2542
directory.  One might use
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2543
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2544
> complete elm c@=@F:$HOME/Mail/@
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2545
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2546
to complete `elm \-f =' as if it were `elm \-f ~/Mail/'.  Note that we used `@'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2547
instead of `/' to avoid confusion with the \fIselect\fR argument, and we used
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2548
`$HOME' instead of `~' because home directory substitution works at only the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2549
beginning of a word.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2550
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2551
\fIsuffix\fR is used to add a nonstandard suffix
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2552
(not space or `/' for directories) to completed words.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2553
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2554
> complete finger 'c/*@/$hostnames/' 'p/1/u/@'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2555
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2556
completes arguments to `finger' from the list of users, appends an `@',
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2557
and then completes after the `@' from the `hostnames' variable.  Note
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2558
again the order in which the completions are specified.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2559
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2560
Finally, here's a complex example for inspiration:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2561
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2562
> complete find \\
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2563
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2564
\&'n/\-name/f/' 'n/\-newer/f/' 'n/\-{,n}cpio/f/' \e
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2565
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2566
\'n/\-exec/c/' 'n/\-ok/c/' 'n/\-user/u/' \e
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2567
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2568
\&'n/\-group/g/' 'n/\-fstype/(nfs 4.2)/' \e
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2569
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2570
\&'n/\-type/(b c d f l p s)/' \e
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2571
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2572
\'c/\-/(name newer cpio ncpio exec ok user \e
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2573
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2574
group fstype type atime ctime depth inum \e
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2575
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2576
ls mtime nogroup nouser perm print prune \e
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2577
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2578
size xdev)/' \e
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2579
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2580
\&'p/*/d/'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2581
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2582
This completes words following `\-name', `\-newer', `\-cpio' or `ncpio'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2583
(note the pattern which matches both) to files,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2584
words following `\-exec' or `\-ok' to commands, words following `user'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2585
and `group' to users and groups respectively
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2586
and words following `\-fstype' or `\-type' to members of the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2587
given lists.  It also completes the switches themselves from the given list
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2588
(note the use of \fBc\fR-type completion)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2589
and completes anything not otherwise completed to a directory.  Whew.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2590
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2591
Remember that programmed completions are ignored if the word being completed
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2592
is a tilde substitution (beginning with `~') or a variable (beginning with `$').
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2593
\fIcomplete\fR is an experimental feature, and the syntax may change
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2594
in future versions of the shell.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2595
See also the \fIuncomplete\fR builtin command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2596
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2597
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2598
.B continue
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2599
Continues execution of the nearest enclosing \fIwhile\fR or \fIforeach\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2600
The rest of the commands on the current line are executed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2601
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2602
.B default:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2603
Labels the default case in a \fIswitch\fR statement.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2604
It should come after all \fIcase\fR labels.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2605
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2606
.B dirs \fR[\fB\-l\fR] [\fB\-n\fR|\fB\-v\fR]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2607
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2608
.B dirs \-S\fR|\fB\-L \fR[\fIfilename\fR] (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2609
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2610
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2611
.B dirs \-c \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2612
The first form prints the directory stack.  The top of the stack is at the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2613
left and the first directory in the stack is the current directory.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2614
With \fB\-l\fR, `~' or `~\fIname\fP' in the output is expanded explicitly
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2615
to \fBhome\fR or the pathname of the home directory for user \fIname\fP.  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2616
With \fB\-n\fR, entries are wrapped before they reach the edge of the screen.  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2617
With \fB\-v\fR, entries are printed one per line, preceded by their stack positions.  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2618
If more than one of \fB\-n\fR or \fB\-v\fR is given, \fB\-v\fR takes precedence.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2619
\fB\-p\fR is accepted but does nothing.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2620
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2621
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2622
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2623
With \fB\-S\fR, the second form saves the directory stack to \fIfilename\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2624
as a series of \fIcd\fR and \fIpushd\fR commands.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2625
With \fB\-L\fR, the shell sources \fIfilename\fR, which is presumably
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2626
a directory stack file saved by the \fB\-S\fR option or the \fBsavedirs\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2627
mechanism.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2628
In either case, \fBdirsfile\fR is used if \fIfilename\fR is not given and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2629
\fI~/.cshdirs\fR is used if \fBdirsfile\fR is unset.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2630
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2631
Note that login shells do the equivalent of `dirs \-L' on startup
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2632
and, if \fBsavedirs\fR is set, `dirs \-S' before exiting.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2633
Because only \fI~/.tcshrc\fR is normally sourced before \fI~/.cshdirs\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2634
\fBdirsfile\fR should be set in \fI~/.tcshrc\fR rather than \fI~/.login\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2635
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2636
The last form clears the directory stack.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2637
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2638
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2639
.B echo \fR[\fB\-n\fR] \fIword\fR ...
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2640
Writes each \fIword\fR to the shell's standard
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2641
output, separated by spaces and terminated with a newline.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2642
The \fBecho_style\fR shell variable may be set to emulate (or not) the flags and escape
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2643
sequences of the BSD and/or System V versions of \fIecho\fR; see \fIecho\fR(1).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2644
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2645
.B echotc \fR[\fB\-sv\fR] \fIarg\fR ... (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2646
Exercises the terminal capabilities (see \fIterminfo\fR(4)) in \fIargs\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2647
For example, 'echotc home' sends the cursor to the home position,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2648
\&'echotc cm 3 10' sends it to column 3 and row 10, and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2649
\&'echotc ts 0; echo "This is a test."; echotc fs' prints "This is a test."
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2650
in the status line.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2651
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2652
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2653
If \fIarg\fR is 'baud', 'cols', 'lines', 'meta' or 'tabs', prints the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2654
value of that capability ("yes" or "no" indicating that the terminal does
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2655
or does not have that capability).  One might use this to make the output
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2656
from a shell script less verbose on slow terminals, or limit command
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2657
output to the number of lines on the screen:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2658
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2659
> set history=`echotc lines`
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2660
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2661
> @ history\-\-
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2662
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2663
Termcap strings may contain wildcards which will not echo correctly.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2664
One should use double quotes when setting a shell variable to a terminal
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2665
capability string, as in the following example that places the date in
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2666
the status line:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2667
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2668
> set tosl="`echotc ts 0`"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2669
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2670
> set frsl="`echotc fs`"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2671
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2672
> echo \-n "$tosl";date; echo \-n "$frsl"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2673
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2674
With \fB\-s\fR, nonexistent capabilities return the empty string rather
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2675
than causing an error.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2676
With \fB\-v\fR, messages are verbose.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2677
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2678
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2679
.B else
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2680
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2681
.B end
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2682
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2683
.B endif
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2684
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2685
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2686
.B endsw
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2687
See the description of the \fIforeach\fR, \fIif\fR, \fIswitch\fR, and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2688
\fIwhile\fR statements below.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2689
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2690
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2691
.B eval \fIarg\fR ...
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2692
Treats the arguments as input to the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2693
shell and executes the resulting command(s) in the context
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2694
of the current shell.  This is usually used to execute commands
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2695
generated as the result of command or variable substitution,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2696
because parsing occurs before these substitutions.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2697
See \fItset\fR(1B) for a sample use of \fIeval\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2698
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2699
.B exec \fIcommand\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2700
Executes the specified command in place of the current shell.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2701
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2702
.B exit \fR[\fIexpr\fR]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2703
The shell exits either with the value of the specified \fIexpr\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2704
(an expression, as described under \fBExpressions\fR)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2705
or, without \fIexpr\fR, with the value 0.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2706
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2707
.B fg \fR[\fB%\fIjob\fR ...]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2708
Brings the specified jobs (or, without arguments, the current job)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2709
into the foreground, continuing each if it is stopped.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2710
\fIjob\fR may be a number, a string, `', `%', `+' or `\-' as described
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2711
under \fBJobs\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2712
See also the \fIrun-fg-editor\fR editor command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2713
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2714
.B filetest \-\fIop file\fR ... (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2715
Applies \fIop\fR (which is a file inquiry operator as described under
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2716
\fBFile inquiry operators\fR) to each \fIfile\fR and returns the results as a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2717
space-separated list.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2718
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2719
.B foreach \fIname \fB(\fIwordlist\fB)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2720
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2721
\&...
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2722
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2723
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2724
.B end
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2725
Successively sets the variable \fIname\fR to each member of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2726
\fIwordlist\fR and executes the sequence of commands between this command
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2727
and the matching \fIend\fR.  (Both \fIforeach\fR and \fIend\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2728
must appear alone on separate lines.)  The builtin command
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2729
\fIcontinue\fR may be used to continue the loop prematurely and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2730
the builtin command \fIbreak\fR to terminate it prematurely.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2731
When this command is read from the terminal, the loop is read once
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2732
prompting with `foreach? ' (or \fBprompt2\fR) before any statements in
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2733
the loop are executed.  If you make a mistake typing in a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2734
loop at the terminal you can rub it out.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2735
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2736
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2737
.B getspath \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2738
Prints the system execution path.  (TCF only)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2739
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2740
.B getxvers \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2741
Prints the experimental version prefix.  (TCF only)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2742
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2743
.B glob \fIwordlist
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2744
Like \fIecho\fR, but the `-n' parameter is not recognized and words are
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2745
delimited by null characters in the output.  Useful for
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2746
programs which wish to use the shell to filename expand a list of words.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2747
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2748
.B goto \fIword
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2749
\fIword\fR is filename and command-substituted to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2750
yield a string of the form `label'.  The shell rewinds its
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2751
input as much as possible, searches for a line of the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2752
form `label:', possibly preceded by blanks or tabs, and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2753
continues execution after that line.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2754
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2755
.B hashstat
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2756
Prints a statistics line indicating how effective the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2757
internal hash table has been at locating commands (and avoiding
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2758
\fIexec\fR's).  An \fIexec\fR is attempted for each component of the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2759
\fBpath\fR where the hash function indicates a possible hit, and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2760
in each component which does not begin with a `/'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2761
.IP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2762
On machines without \fIvfork\fR(2), prints only the number and size of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2763
hash buckets.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2764
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2765
.B history \fR[\fB\-hTr\fR] [\fIn\fR]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2766
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2767
.B history \-S\fR|\fB\-L|\fB\-M \fR[\fIfilename\fR] (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2768
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2769
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2770
.B history \-c \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2771
The first form prints the history event list.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2772
If \fIn\fR is given only the \fIn\fR most recent events are printed or saved.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2773
With \fB\-h\fR, the history list is printed without leading numbers.  If
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2774
\fB-T\fR is specified, timestamps are printed also in comment form.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2775
(This can be used to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2776
produce files suitable for loading with 'history \-L' or 'source \-h'.)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2777
With \fB\-r\fR, the order of printing is most recent
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2778
first rather than oldest first.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2779
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2780
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2781
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2782
With \fB\-S\fR, the second form saves the history list to \fIfilename\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2783
If the first word of the \fBsavehist\fR shell variable is set to a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2784
number, at most that many lines are saved.  If the second word of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2785
\fBsavehist\fR is set to `merge', the history list is merged with the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2786
existing history file instead of replacing it (if there is one) and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2787
sorted by time stamp.  (+) Merging is intended for an environment like
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2788
the X Window System
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2789
with several shells in simultaneous use.  Currently it succeeds
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2790
only when the shells quit nicely one after another.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2791
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2792
With \fB\-L\fR, the shell appends \fIfilename\fR, which is presumably a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2793
history list saved by the \fB\-S\fR option or the \fBsavehist\fR mechanism,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2794
to the history list.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2795
\fB\-M\fR is like \fB\-L\fR, but the contents of \fIfilename\fR are merged
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2796
into the history list and sorted by timestamp.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2797
In either case, \fBhistfile\fR is used if \fIfilename\fR is not given and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2798
\fI~/.history\fR is used if \fBhistfile\fR is unset.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2799
`history \-L' is exactly like 'source \-h' except that it does not require a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2800
filename.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2801
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2802
Note that login shells do the equivalent of `history \-L' on startup
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2803
and, if \fBsavehist\fR is set, `history \-S' before exiting.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2804
Because only \fI~/.tcshrc\fR is normally sourced before \fI~/.history\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2805
\fBhistfile\fR should be set in \fI~/.tcshrc\fR rather than \fI~/.login\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2806
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2807
If \fBhistlit\fR is set, the first and second forms print and save the literal
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2808
(unexpanded) form of the history list.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2809
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2810
The last form clears the history list.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2811
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2812
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2813
.B hup \fR[\fIcommand\fR] \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2814
With \fIcommand\fR, runs \fIcommand\fR such that it will exit on a hangup
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2815
signal and arranges for the shell to send it a hangup signal when the shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2816
exits.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2817
Note that commands may set their own response to hangups, overriding \fIhup\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2818
Without an argument (allowed in only a shell script), causes the shell to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2819
exit on a hangup for the remainder of the script.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2820
See also \fBSignal handling\fR and the \fInohup\fR builtin command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2821
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2822
.B if (\fIexpr\fB) \fIcommand
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2823
If \fIexpr\fR (an expression, as described under \fBExpressions\fR)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2824
evaluates true, then \fIcommand\fR is executed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2825
Variable substitution on \fIcommand\fR happens early, at the same time it
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2826
does for the rest of the \fIif\fR command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2827
\fIcommand\fR must be a simple command, not an alias, a pipeline, a command list
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2828
or a parenthesized command list, but it may have arguments.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2829
Input/output redirection occurs even if \fIexpr\fR is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2830
false and \fIcommand\fR is thus \fInot\fR executed; this is a bug.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2831
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2832
.B if (\fIexpr\fB) then
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2833
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2834
\&...
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2835
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2836
.B else if (\fIexpr2\fB) then
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2837
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2838
\&...
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2839
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2840
.B else
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2841
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2842
\&...
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2843
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2844
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2845
.B endif
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2846
If the specified \fIexpr\fR is true then the commands to the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2847
first \fIelse\fR are executed; otherwise if \fIexpr2\fR is true then
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2848
the commands to the second \fIelse\fR are executed, etc.  Any
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2849
number of \fIelse-if\fR pairs are possible; only one \fIendif\fR is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2850
needed.  The \fIelse\fR part is likewise optional.  (The words
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2851
\fIelse\fR and \fIendif\fR must appear at the beginning of input lines;
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2852
the \fIif\fR must appear alone on its input line or after an
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2853
\fIelse\fR.)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2854
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2855
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2856
.B inlib \fIshared-library\fR ... (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2857
Adds each \fIshared-library\fR to the current environment.  There is no way
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2858
to remove a shared library.  (Domain/OS only)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2859
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2860
.B jobs \fR[\fB\-l\fR]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2861
Lists the active jobs.  With \fB\-l\fR, lists process
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2862
IDs in addition to the normal information.  On TCF systems, prints
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2863
the site on which each job is executing.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2864
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2865
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2866
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2867
.B kill \fR[\fB\-s \fIsignal\fR] \fB%\fIjob\fR|\fIpid\fR ...
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2868
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2869
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2870
.B kill \-l
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2871
The first and second forms sends the specified \fIsignal\fR (or, if none
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2872
is given, the TERM (terminate) signal) to the specified jobs or processes.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2873
\fIjob\fR may be a number, a string, `', `%', `+' or `\-' as described
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2874
under \fBJobs\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2875
Signals are either given by number or by name (as given in
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2876
\fI/usr/include/signal.h\fR, stripped of the prefix `SIG').
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2877
There is no default \fIjob\fR; saying just `kill' does not send a signal
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2878
to the current job.  If the signal being sent is TERM (terminate)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2879
or HUP (hangup), then the job or process is sent a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2880
CONT (continue) signal as well.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2881
The third form lists the signal names.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2882
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2883
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2884
.B limit \fR[\fB\-h\fR] [\fIresource\fR [\fImaximum-use\fR]]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2885
Limits the consumption by the current process and each
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2886
process it creates to not individually exceed \fImaximum-use\fR on
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2887
the specified \fIresource\fR.  If no \fImaximum-use\fR is given, then
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2888
the current limit is printed; if no \fIresource\fR is given, then
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2889
all limitations are given.  If the \fB\-h\fR flag is given, the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2890
hard limits are used instead of the current limits.  The
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2891
hard limits impose a ceiling on the values of the current
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2892
limits.  Only the super-user may raise the hard limits, but
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2893
a user may lower or raise the current limits within the legal range.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2894
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2895
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2896
Controllable resources currently include (if supported by the OS):
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2897
.TP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2898
\fIcputime\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2899
the maximum number of cpu-seconds to be used by each process
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2900
.TP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2901
\fIfilesize\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2902
the largest single file which can be created
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2903
.TP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2904
\fIdatasize\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2905
the maximum growth of the data+stack region via sbrk(2) beyond
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2906
the end of the program text
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2907
.TP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2908
\fIstacksize\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2909
the maximum size of the automatically-extended stack region
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2910
.TP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2911
\fIcoredumpsize\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2912
the size of the largest core dump that will be created
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2913
.TP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2914
\fImemoryuse\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2915
the maximum amount of physical memory a process
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2916
may have allocated to it at a given time
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2917
.TP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2918
\fIheapsize\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2919
the maximum amount of memory a process
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2920
may allocate per \fIbrk()\fR system call
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2921
.TP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2922
\fIdescriptors\fR or \fIopenfiles\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2923
the maximum number of open files for this process
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2924
.TP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2925
\fIconcurrency\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2926
the maximum number of threads for this process
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2927
.TP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2928
\fImemorylocked\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2929
the maximum size which a process may lock into memory using mlock(2)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2930
.TP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2931
\fImaxproc\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2932
the maximum number of simultaneous processes for this user id
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2933
.TP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2934
\fIsbsize\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2935
the maximum size of socket buffer usage for this user
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2936
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2937
\fImaximum-use\fR may be given as a (floating point or
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2938
integer) number followed by a scale factor.  For all limits
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2939
other than \fIcputime\fR the default scale is `k' or `kilobytes'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2940
(1024 bytes); a scale factor of `m' or `megabytes' may also
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2941
be used.  For \fIcputime\fR the default scaling is `seconds',
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2942
while `m' for minutes or `h' for hours, or a time of the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2943
form `mm:ss' giving minutes and seconds may be used.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2944
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2945
For both \fIresource\fR names and scale factors, unambiguous
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2946
prefixes of the names suffice.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2947
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2948
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2949
.B log \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2950
Prints the \fBwatch\fR shell variable and reports on each user indicated
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2951
in \fBwatch\fR who is logged in, regardless of when they last logged in.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2952
See also \fIwatchlog\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2953
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2954
.B login
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2955
Terminates a login shell, replacing it with an instance of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2956
\fI/bin/login.\fR This is one way to log off, included for
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2957
compatibility with \fIsh\fR(1).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2958
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2959
.B logout
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2960
Terminates a login shell.  Especially useful if \fBignoreeof\fR is set.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2961
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2962
.B ls\-F \fR[\-\fIswitch\fR ...] [\fIfile\fR ...] (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2963
Lists files like `ls \-F', but much faster.  It identifies each type of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2964
special file in the listing with a special character:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2965
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2966
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2967
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2968
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2969
/
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2970
Directory
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2971
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2972
*
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2973
Executable
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2974
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2975
#
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2976
Block device
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2977
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2978
%
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2979
Character device
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2980
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2981
|
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2982
Named pipe (systems with named pipes only)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2983
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2984
=
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2985
Socket (systems with sockets only)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2986
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2987
@
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2988
Symbolic link (systems with symbolic links only)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2989
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2990
+
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2991
Hidden directory (AIX only) or context dependent (HP/UX only)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2992
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2993
:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2994
Network special (HP/UX only)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2995
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2996
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2997
If the \fBlistlinks\fR shell variable is set, symbolic links are identified
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2998
in more detail (on only systems that have them, of course):
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  2999
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3000
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3001
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3002
@
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3003
Symbolic link to a non-directory
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3004
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3005
>
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3006
Symbolic link to a directory
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3007
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3008
&
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3009
Symbolic link to nowhere
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3010
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3011
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3012
\fBlistlinks\fR also slows down \fIls\-F\fR and causes partitions holding
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3013
files pointed to by symbolic links to be mounted.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3014
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3015
If the \fBlistflags\fR shell variable is set to `x', `a' or `A', or any
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3016
combination thereof (e.g., `xA'), they are used as flags to \fIls\-F\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3017
making it act like `ls \-xF', `ls \-Fa', `ls \-FA' or a combination
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3018
(e.g., `ls \-FxA').
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3019
On machines where `ls \-C' is not the default, \fIls\-F\fR acts like `ls \-CF',
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3020
unless \fBlistflags\fR contains an `x', in which case it acts like `ls \-xF'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3021
\fIls\-F\fR passes its arguments to \fIls\fR(1) if it is given any switches,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3022
so `alias ls ls\-F' generally does the right thing.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3023
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3024
The \fBls\-F\fR builtin can list files using different colors depending on the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3025
filetype or extension.  See the \fBcolor\fR \fItcsh\fR variable and the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3026
\fBLS_COLORS\fR environment variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3027
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3028
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3029
.B migrate \fR[\fB\-\fIsite\fR] \fIpid\fR|\fB%\fIjobid\fR ... (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3030
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3031
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3032
.B migrate \-\fIsite\fR (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3033
The first form migrates the process or job to the site specified or the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3034
default site determined by the system path.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3035
The second form is equivalent to `migrate \-\fIsite\fR $$': it migrates the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3036
current process to the specified site.  Migrating the shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3037
itself can cause unexpected behavior, because the shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3038
does not like to lose its tty.  (TCF only)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3039
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3040
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3041
.B newgrp \fR[\fB\-\fR] \fIgroup\fR (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3042
Equivalent to `exec newgrp'; see \fInewgrp\fR(1).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3043
Available only if the shell was so compiled;
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3044
see the \fBversion\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3045
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3046
.B nice \fR[\fB+\fInumber\fR] [\fIcommand\fR]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3047
Sets the scheduling priority for the shell to \fInumber\fR, or, without
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3048
\fInumber\fR, to 4.  With \fIcommand\fR, runs \fIcommand\fR at the appropriate
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3049
priority.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3050
The greater the \fInumber\fR, the less cpu
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3051
the process gets.  The super-user may specify negative
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3052
priority by using `nice \-number ...'.  Command is always
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3053
executed in a sub-shell, and the restrictions placed on
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3054
commands in simple \fIif\fR statements apply.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3055
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3056
.B nohup \fR[\fIcommand\fR]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3057
With \fIcommand\fR, runs \fIcommand\fR such that it will ignore hangup signals.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3058
Note that commands may set their own response to hangups, overriding \fInohup\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3059
Without an argument (allowed in only a shell script), causes the shell to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3060
ignore hangups for the remainder of the script.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3061
See also \fBSignal handling\fR and the \fIhup\fR builtin command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3062
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3063
.B notify \fR[\fB%\fIjob\fR ...]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3064
Causes the shell to notify the user asynchronously when the status of any
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3065
of the specified jobs (or, without %\fIjob\fR, the current job) changes,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3066
instead of waiting until the next prompt as is usual.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3067
\fIjob\fR may be a number, a string, `', `%', `+' or `\-' as described
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3068
under \fBJobs\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3069
See also the \fBnotify\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3070
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3071
.B onintr \fR[\fB\-\fR|\fIlabel\fR]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3072
Controls the action of the shell on interrupts.  Without arguments,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3073
restores the default action of the shell on interrupts,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3074
which is to terminate shell scripts or to return to the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3075
terminal command input level.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3076
With `\-', causes all interrupts to be ignored.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3077
With \fIlabel\fR, causes the shell to execute a `goto \fIlabel\fR'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3078
when an interrupt is received or a child process terminates because it was
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3079
interrupted.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3080
.IP "" 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3081
\fIonintr\fR is ignored if the shell is running detached and in system
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3082
startup files (see \fBFILES\fR), where interrupts are disabled anyway.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3083
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3084
.B popd \fR[\fB\-p\fR] [\fB\-l\fR] [\fB\-n\fR|\fB\-v\fR] \fR[\fB+\fIn\fR]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3085
Without arguments, pops the directory stack and returns to the new top directory.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3086
With a number `+\fIn\fR', discards the \fIn\fR'th entry in the stack.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3087
.IP "" 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3088
Finally, all forms of \fIpopd\fR print the final directory stack,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3089
just like \fIdirs\fR.  The \fBpushdsilent\fR shell variable can be set to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3090
prevent this and the \fB\-p\fR flag can be given to override \fBpushdsilent\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3091
The \fB\-l\fR, \fB\-n\fR and \fB\-v\fR flags have the same effect on \fIpopd\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3092
as on \fIdirs\fR.  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3093
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3094
.B printenv \fR[\fIname\fR] (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3095
Prints the names and values of all environment variables or,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3096
with \fIname\fR, the value of the environment variable \fIname\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3097
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3098
.B pushd \fR[\fB\-p\fR] [\fB\-l\fR] [\fB\-n\fR|\fB\-v\fR] [\fIname\fR|\fB+\fIn\fR]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3099
Without arguments, exchanges the top two elements of the directory stack.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3100
If \fBpushdtohome\fR is set, \fIpushd\fR without arguments does `pushd ~',
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3101
like \fIcd\fR.  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3102
With \fIname\fR, pushes the current working directory onto the directory
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3103
stack and changes to \fIname\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3104
If \fIname\fR is `\-' it is interpreted as the previous working directory
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3105
(see \fBFilename substitution\fR).  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3106
If \fBdunique\fR is set, \fIpushd\fR removes any instances of \fIname\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3107
from the stack before pushing it onto the stack.  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3108
With a number `+\fIn\fR', rotates the \fIn\fRth element of the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3109
directory stack around to be the top element and changes to it.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3110
If \fBdextract\fR is set, however, `pushd +\fIn\fR' extracts the \fIn\fRth
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3111
directory, pushes it onto the top of the stack and changes to it.  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3112
.IP "" 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3113
Finally, all forms of \fIpushd\fR print the final directory stack,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3114
just like \fIdirs\fR.  The \fBpushdsilent\fR shell variable can be set to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3115
prevent this and the \fB\-p\fR flag can be given to override \fBpushdsilent\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3116
The \fB\-l\fR, \fB\-n\fR and \fB\-v\fR flags have the same effect on \fIpushd\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3117
as on \fIdirs\fR.  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3118
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3119
.B rehash
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3120
Causes the internal hash table of the contents of the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3121
directories in the \fBpath\fR variable to be recomputed.  This is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3122
needed if new commands are added to directories in \fBpath\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3123
while you are logged in.  This should be necessary only if
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3124
you add commands to one of your own directories, or if a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3125
systems programmer changes the contents of one of the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3126
system directories.  Also flushes the cache of home directories
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3127
built by tilde expansion.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3128
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3129
.B repeat \fIcount command
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3130
The specified \fIcommand\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3131
which is subject to the same restrictions as the \fIcommand\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3132
in the one line \fIif\fR statement above, is executed \fIcount\fR times.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3133
I/O redirections occur exactly once, even if \fIcount\fR is 0.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3134
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3135
.B rootnode //\fInodename \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3136
Changes the rootnode to //\fInodename\fR, so that `/' will be interpreted
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3137
as `//\fInodename\fR'.  (Domain/OS only)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3138
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3139
.B sched \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3140
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3141
.B sched \fR[\fB+\fR]\fIhh:mm command\fR \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3142
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3143
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3144
.B sched \-\fIn\fR (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3145
The first form prints the scheduled-event list.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3146
The \fBsched\fR shell variable may be set to define the format in which
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3147
the scheduled-event list is printed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3148
The second form adds \fIcommand\fR to the scheduled-event list.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3149
For example,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3150
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3151
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3152
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3153
> sched 11:00 echo It\\'s eleven o\\'clock.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3154
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3155
causes the shell to echo `It's eleven o'clock.' at 11 AM.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3156
The time may be in 12-hour AM/PM format
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3157
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3158
> sched 5pm set prompt='[%h] It\\'s after 5; go home: >'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3159
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3160
or may be relative to the current time:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3161
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3162
> sched +2:15 /usr/lib/uucp/uucico \-r1 \-sother
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3163
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3164
A relative time specification may not use AM/PM format.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3165
The third form removes item \fIn\fR from the event list:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3166
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3167
> sched
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3168
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3169
     1  Wed Apr  4 15:42  /usr/lib/uucp/uucico \-r1 \-sother
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3170
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3171
     2  Wed Apr  4 17:00  set prompt=[%h] It's after 5; go home: >
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3172
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3173
> sched \-2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3174
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3175
> sched
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3176
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3177
     1  Wed Apr  4 15:42  /usr/lib/uucp/uucico \-r1 \-sother
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3178
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3179
A command in the scheduled-event list is executed just before the first
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3180
prompt is printed after the time when the command is scheduled.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3181
It is possible to miss the exact time when the command is to be run, but
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3182
an overdue command will execute at the next prompt.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3183
A command which comes due while the shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3184
is waiting for user input is executed immediately.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3185
However, normal operation of an already-running command will not
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3186
be interrupted so that a scheduled-event list element may be run.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3187
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3188
This mechanism is similar to, but not the same as, the \fIat\fR(1)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3189
command on some Unix systems.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3190
Its major disadvantage is that it may not run a command at exactly the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3191
specified time.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3192
Its major advantage is that because \fIsched\fR runs directly from
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3193
the shell, it has access to shell variables and other structures.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3194
This provides a mechanism for changing one's working environment
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3195
based on the time of day.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3196
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3197
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3198
.B set
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3199
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3200
.B set \fIname\fR ...
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3201
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3202
.B set \fIname\fR\fB=\fIword\fR ...
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3203
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3204
.B set [\-r] [\-f|\-l] \fIname\fR\fB=(\fIwordlist\fB)\fR ... (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3205
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3206
.B set \fIname[index]\fR\fB=\fIword\fR ...
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3207
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3208
.B set \-r \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3209
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3210
.B set \-r \fIname\fR ... (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3211
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3212
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3213
.B set \-r \fIname\fR\fB=\fIword\fR ... (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3214
The first form of the command prints the value of all shell variables.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3215
Variables which contain more than a single word print as a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3216
parenthesized word list.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3217
The second form sets \fIname\fR to the null string.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3218
The third form sets \fIname\fR to the single \fIword\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3219
The fourth form sets \fIname\fR to the list of words in
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3220
\fIwordlist\fR.  In all cases the value is command and filename expanded.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3221
If \-r is specified, the value is set read-only.  If \-f or \-l are
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3222
specified, set only unique words keeping their order.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3223
\-f prefers the first occurrence of a word, and \-l the last.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3224
The fifth form sets the \fIindex\fR'th component of name to \fIword\fR;
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3225
this component must already exist.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3226
The sixth form lists only the names of all shell variables that are read-only.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3227
The seventh form makes \fIname\fR read-only, whether or not it has a value.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3228
The second form sets \fIname\fR to the null string.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3229
The eighth form is the same as the third form, but
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3230
make \fIname\fR read-only at the same time.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3231
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3232
.IP "" 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3233
These arguments can be repeated to set and/or make read-only multiple variables
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3234
in a single set command.  Note, however, that variable expansion
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3235
happens for all arguments before any setting occurs.  Note also that `=' can
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3236
be adjacent to both \fIname\fR and \fIword\fR or separated from both by
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3237
whitespace, but cannot be adjacent to only one or the other.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3238
See also the \fIunset\fR builtin command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3239
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3240
.B setenv \fR[\fIname \fR[\fIvalue\fR]]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3241
Without arguments, prints the names and values of all environment variables.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3242
Given \fIname\fR, sets the environment variable \fIname\fR to \fIvalue\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3243
or, without \fIvalue\fR, to the null string.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3244
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3245
.B setpath \fIpath \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3246
Equivalent to \fIsetpath\fR(1).  (Mach only)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3247
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3248
.B setspath\fR LOCAL|\fIsite\fR|\fIcpu\fR ...  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3249
Sets the system execution path.  (TCF only)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3250
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3251
.B settc \fIcap value \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3252
Tells the shell to believe that the terminal capability \fIcap\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3253
(as defined in \fIterminfo\fR(4)) has the value \fIvalue\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3254
No sanity checking is done.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3255
Concept terminal users may have to `settc xn no' to get proper
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3256
wrapping at the rightmost column.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3257
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3258
.B setty \fR[\fB\-d\fR|\fB\-q\fR|\fB\-x\fR] [\fB\-a\fR] [[\fB+\fR|\fB\-\fR]\fImode\fR] (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3259
Controls which tty modes (see \fBTerminal management\fR)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3260
the shell does not allow to change.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3261
\fB\-d\fR, \fB\-q\fR or \fB\-x\fR tells \fIsetty\fR to act
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3262
on the `edit', `quote' or `execute' set of tty modes respectively; without
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3263
\fB\-d\fR, \fB\-q\fR or \fB\-x\fR, `execute' is used.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3264
.IP "" 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3265
Without other arguments, \fIsetty\fR lists the modes in the chosen set
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3266
which are fixed on (`+mode') or off (`\-mode').
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3267
The available modes, and thus the display, vary from system to system.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3268
With \fB\-a\fR, lists all tty modes in the chosen set
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3269
whether or not they are fixed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3270
With \fB+\fImode\fR, \fB\-\fImode\fR or \fImode\fR, fixes \fImode\fR on or off
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3271
or removes control from \fImode\fR in the chosen set.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3272
For example, `setty +echok echoe' fixes `echok' mode on and allows commands
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3273
to turn `echoe' mode on or off, both when the shell is executing commands.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3274
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3275
.B setxvers\fR [\fIstring\fR] (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3276
Set the experimental version prefix to \fIstring\fR, or removes it
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3277
if \fIstring\fR is omitted.  (TCF only)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3278
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3279
.B shift \fR[\fIvariable\fR]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3280
Without arguments, discards \fBargv\fR[1] and shifts the members of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3281
\fBargv\fR to the left.  It is an error for \fBargv\fR not to be set or to have
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3282
less than one word as value.  With \fIvariable\fR, performs the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3283
same function on \fIvariable\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3284
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3285
.B source \fR[\fB\-h\fR] \fIname\fR [\fIargs\fR ...]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3286
The shell reads and executes commands from \fIname\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3287
The commands are not placed on the history list.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3288
If any \fIargs\fR are given, they are placed in \fBargv\fR.  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3289
\fIsource\fR commands may be nested;
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3290
if they are nested too deeply the shell may run out of file descriptors.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3291
An error in a \fIsource\fR at any level terminates all nested
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3292
\fIsource\fR commands.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3293
With \fB\-h\fR, commands are placed on the history list instead of being
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3294
executed, much like `history \-L'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3295
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3296
.B stop \fB%\fIjob\fR|\fIpid\fR ...
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3297
Stops the specified jobs or processes which are executing in the background.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3298
\fIjob\fR may be a number, a string, `', `%', `+' or `\-' as described
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3299
under \fBJobs\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3300
There is no default \fIjob\fR; saying just `stop' does not stop
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3301
the current job.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3302
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3303
.B suspend
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3304
Causes the shell to stop in its tracks, much as if it had
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3305
been sent a stop signal with \fB^Z\fR.  This is most often used to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3306
stop shells started by \fIsu\fR(1M).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3307
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3308
.B switch (\fIstring\fB)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3309
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3310
.B case \fIstr1\fB:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3311
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3312
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3313
\&...
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3314
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3315
.B breaksw
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3316
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3317
\&...
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3318
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3319
.B default:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3320
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3321
\&...
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3322
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3323
.B breaksw
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3324
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3325
.B endsw
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3326
Each case label is successively matched, against the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3327
specified \fIstring\fR which is first command and filename expanded.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3328
The file metacharacters `*', `?' and `[...]'  may be used
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3329
in the case labels, which are variable expanded.  If none
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3330
of the labels match before a `default' label is found, then
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3331
the execution begins after the default label.  Each case
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3332
label and the default label must appear at the beginning of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3333
a line.  The command \fIbreaksw\fR causes execution to continue
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3334
after the \fIendsw\fR.  Otherwise control may fall through case
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3335
labels and default labels as in C.  If no label matches and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3336
there is no default, execution continues after the \fIendsw\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3337
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3338
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3339
.B telltc \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3340
Lists the values of all terminal capabilities (see \fIterminfo\fR(4)).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3341
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3342
.B termname \fR[\fIterminal type\fR] \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3343
Tests if \fIterminal type\fR (or the current value of \fBTERM\fR if no
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3344
\fIterminal type\fR is given) has an entry in the hosts
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3345
terminfo(4) database. Prints the terminal type to stdout and returns 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3346
if an entry is present otherwise returns 1.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3347
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3348
.B time \fR[\fIcommand\fR]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3349
Executes \fIcommand\fR (which must be a simple command, not an alias,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3350
a pipeline, a command list or a parenthesized command list)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3351
and prints a time summary as described under the \fBtime\fR variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3352
If necessary, an extra shell is created to print the time statistic when
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3353
the command completes.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3354
Without \fIcommand\fR, prints a time summary for the current shell and its
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3355
children.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3356
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3357
.B umask \fR[\fIvalue\fR]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3358
Sets the file creation mask to \fIvalue\fR, which is given in octal.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3359
Common values for the mask are
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3360
002, giving all access to the group and read and execute access to others, and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3361
022, giving read and execute access to the group and others.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3362
Without \fIvalue\fR, prints the current file creation mask.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3363
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3364
.B unalias \fIpattern
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3365
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3366
Removes all aliases whose names match \fIpattern\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3367
`unalias *' thus removes all aliases.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3368
It is not an error for nothing to be \fIunalias\fRed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3369
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3370
.B uncomplete \fIpattern\fR (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3371
Removes all completions whose names match \fIpattern\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3372
`uncomplete *' thus removes all completions.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3373
It is not an error for nothing to be \fIuncomplete\fRd.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3374
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3375
.B unhash
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3376
Disables use of the internal hash table to speed location of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3377
executed programs.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3378
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3379
.B universe \fIuniverse\fR (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3380
Sets the universe to \fIuniverse\fR.  (Masscomp/RTU only)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3381
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3382
.B unlimit \fR[\fB\-hf\fR] [\fIresource\fR]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3383
Removes the limitation on \fIresource\fR or, if no \fIresource\fR is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3384
specified, all \fIresource\fR limitations.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3385
With \fB\-h\fR, the corresponding hard limits are removed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3386
Only the super-user may do this.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3387
Note that \fBunlimit\fR may not exit successful, since most systems
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3388
do not allow \fIdescriptors\fR to be unlimited.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3389
With \fB\-f\fR errors are ignored.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3390
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3391
.B unset \fIpattern
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3392
Removes all variables whose names match \fIpattern\fR, unless they are read-only.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3393
`unset *' thus removes all variables unless they are read-only;
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3394
this is a bad idea.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3395
It is not an error for nothing to be \fIunset\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3396
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3397
.B unsetenv \fIpattern
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3398
Removes all environment variables whose names match \fIpattern\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3399
`unsetenv *' thus removes all environment variables;
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3400
this is a bad idea.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3401
It is not an error for nothing to be \fIunsetenv\fRed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3402
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3403
.B ver \fR[\fIsystype\fR [\fIcommand\fR]] (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3404
Without arguments, prints \fBSYSTYPE\fR.  With \fIsystype\fR, sets \fBSYSTYPE\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3405
to \fIsystype\fR.  With \fIsystype\fR and \fIcommand\fR, executes \fIcommand\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3406
under \fIsystype\fR.  \fIsystype\fR may be `bsd4.3' or `sys5.3'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3407
(Domain/OS only)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3408
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3409
.B wait
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3410
The shell waits for all background jobs.  If the shell is interactive, an
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3411
interrupt will disrupt the wait and cause the shell to print the names and job
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3412
numbers of all outstanding jobs.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3413
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3414
.B warp \fIuniverse\fR (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3415
Sets the universe to \fIuniverse\fR.  (Convex/OS only)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3416
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3417
.B watchlog \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3418
An alternate name for the \fIlog\fR builtin command (q.v.).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3419
Available only if the shell was so compiled;
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3420
see the \fBversion\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3421
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3422
.B where \fIcommand\fR (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3423
Reports all known instances of \fIcommand\fR, including aliases, builtins and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3424
executables in \fBpath\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3425
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3426
.B which\fR \fIcommand\fR (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3427
Displays the command that will be executed by the shell after substitutions,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3428
\fBpath\fR searching, etc.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3429
The builtin command is just like \fIwhich\fR(1), but it correctly reports
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3430
\fItcsh\fR aliases and builtins and is 10 to 100 times faster.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3431
See also the \fIwhich-command\fR editor command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3432
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3433
.B while (\fIexpr\fB)\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3434
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3435
\&...
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3436
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3437
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3438
.B end
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3439
Executes the commands between the \fIwhile\fR and the matching \fIend\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3440
while \fIexpr\fR (an expression, as described under \fBExpressions\fR)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3441
evaluates non-zero.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3442
\fIwhile\fR and \fIend\fR must appear alone on their input lines.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3443
\fIbreak\fR and \fIcontinue\fR may be used to terminate or continue the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3444
loop prematurely.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3445
If the input is a terminal, the user is prompted the first time
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3446
through the loop as with \fIforeach\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3447
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3448
.SS "Special aliases (+)"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3449
If set, each of these aliases executes automatically at the indicated time.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3450
They are all initially undefined.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3451
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3452
.B beepcmd
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3453
Runs when the shell wants to ring the terminal bell.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3454
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3455
.B cwdcmd
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3456
Runs after every change of working directory.  For example, if the user is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3457
working on an X window system using \fIxterm\fR(1) and a re-parenting window
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3458
manager that supports title bars such as \fItwm\fR(1) and does
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3459
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3460
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3461
> alias cwdcmd  'echo \-n "^[]2;${HOST}:$cwd ^G"'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3462
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3463
then the shell will change the title of the running \fIxterm\fR(1)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3464
to be the name of the host, a colon, and the full current working directory.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3465
A fancier way to do that is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3466
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3467
> alias cwdcmd 'echo \-n "^[]2;${HOST}:$cwd^G^[]1;${HOST}^G"'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3468
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3469
This will put the hostname and working directory on the title bar but
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3470
only the hostname in the icon manager menu.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3471
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3472
Note that putting a \fIcd\fR, \fIpushd\fR or \fIpopd\fR in \fIcwdcmd\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3473
may cause an infinite loop.  It is the author's opinion that anyone doing
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3474
so will get what they deserve.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3475
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3476
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3477
.B jobcmd
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3478
Runs before each command gets executed, or when the command changes state.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3479
This is similar to \fIpostcmd\fR, but it does not print builtins.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3480
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3481
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3482
> alias jobcmd  'echo \-n "^[]2\e;\e!#:q^G"'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3483
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3484
then executing \fIvi foo.c\fR will put the command string in the xterm title bar.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3485
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3486
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3487
.B helpcommand
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3488
Invoked by the \fBrun-help\fR editor command.  The command name for which help
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3489
is sought is passed as sole argument.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3490
For example, if one does
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3491
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3492
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3493
> alias helpcommand '\e!:1 --help'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3494
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3495
then the help display of the command itself will be invoked, using the GNU
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3496
help calling convention.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3497
Currently there is no easy way to account for various calling conventions (e.g.,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3498
the customary Unix `-h'), except by using a table of many commands.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3499
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3500
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3501
.B periodic
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3502
Runs every \fBtperiod\fR minutes.  This provides a convenient means for
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3503
checking on common but infrequent changes such as new mail.  For example,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3504
if one does
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3505
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3506
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3507
> set tperiod = 30
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3508
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3509
> alias periodic checknews
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3510
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3511
then the \fIchecknews\fR(1) program runs every 30 minutes.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3512
If \fIperiodic\fR is set but \fBtperiod\fR is unset or set to 0,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3513
\fIperiodic\fR behaves like \fIprecmd\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3514
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3515
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3516
.B precmd
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3517
Runs just before each prompt is printed.  For example, if one does
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3518
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3519
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3520
> alias precmd date
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3521
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3522
then \fIdate\fR(1) runs just before the shell prompts for each command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3523
There are no limits on what \fIprecmd\fR can be set to do, but discretion
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3524
should be used.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3525
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3526
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3527
.B postcmd
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3528
Runs before each command gets executed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3529
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3530
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3531
> alias postcmd  'echo \-n "^[]2\e;\e!#:q^G"'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3532
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3533
then executing \fIvi foo.c\fR will put the command string in the xterm title bar.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3534
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3535
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3536
.B shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3537
Specifies the interpreter for executable scripts which do not themselves
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3538
specify an interpreter.  The first word should be a full path name to the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3539
desired interpreter (e.g., `/bin/csh' or `/usr/local/bin/tcsh').
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3540
.SS "Special shell variables"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3541
The variables described in this section have special meaning to the shell.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3542
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3543
The shell sets \fBaddsuffix\fR, \fBargv\fR, \fBautologout\fR, \fBcsubstnonl\fR, \fBcommand\fR, \fBecho_style\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3544
\fBedit\fR, \fBgid\fR, \fBgroup\fR, \fBhome\fR, \fBloginsh\fR, \fBoid\fR, \fBpath\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3545
\fBprompt\fR, \fBprompt2\fR, \fBprompt3\fR, \fBshell\fR, \fBshlvl\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3546
\fBtcsh\fR, \fBterm\fR, \fBtty\fR, \fBuid\fR, \fBuser\fR and \fBversion\fR at
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3547
startup; they do not change thereafter unless changed by the user.  The shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3548
updates \fBcwd\fR, \fBdirstack\fR, \fBowd\fR and \fBstatus\fR when necessary,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3549
and sets \fBlogout\fR on logout.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3550
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3551
The shell synchronizes \fBgroup\fR, \fBhome\fR, \fBpath\fR, \fBshlvl\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3552
\fBterm\fR and \fBuser\fR with the environment variables of the same names:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3553
whenever the environment variable changes the shell changes the corresponding
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3554
shell variable to match (unless the shell variable is read-only) and vice
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3555
versa.  Note that although \fBcwd\fR and \fBPWD\fR have identical meanings, they
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3556
are not synchronized in this manner, and that the shell automatically
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3557
interconverts the different formats of \fBpath\fR and \fBPATH\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3558
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3559
.B addsuffix \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3560
If set, filename completion adds `/' to the end of directories and a space
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3561
to the end of normal files when they are matched exactly.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3562
Set by default.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3563
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3564
.B afsuser \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3565
If set, \fBautologout\fR's autolock feature uses its value instead of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3566
the local username for kerberos authentication.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3567
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3568
.B ampm \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3569
If set, all times are shown in 12-hour AM/PM format.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3570
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3571
.B argv
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3572
The arguments to the shell.  Positional parameters are taken from \fBargv\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3573
i.e., `$1' is replaced by `$argv[1]', etc.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3574
Set by default, but usually empty in interactive shells.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3575
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3576
.B autocorrect \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3577
If set, the \fIspell-word\fR editor command is invoked automatically before
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3578
each completion attempt.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3579
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3580
.B autoexpand \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3581
If set, the \fIexpand-history\fR editor command is invoked automatically
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3582
before each completion attempt. If this is set to \fIonlyhistory\fR, then
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3583
only history will be expanded and a second completion will expand filenames.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3584
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3585
.B autolist \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3586
If set, possibilities are listed after an ambiguous completion.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3587
If set to `ambiguous', possibilities are listed only when no new
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3588
characters are added by completion.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3589
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3590
.B autologout \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3591
The first word is the number of minutes of inactivity before automatic
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3592
logout.  The optional second word is the number of minutes of inactivity
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3593
before automatic locking.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3594
When the shell automatically logs out,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3595
it prints `auto-logout', sets the variable logout to `automatic' and exits.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3596
When the shell automatically locks, the user is required to enter his password
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3597
to continue working.  Five incorrect attempts result in automatic logout.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3598
Set to `60' (automatic logout after 60 minutes, and no locking) by default
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3599
in login and superuser shells, but not if the shell thinks it is running
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3600
under a window system (i.e., the \fBDISPLAY\fR environment variable is set),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3601
the tty is a pseudo-tty (pty) or the shell was not so compiled (see the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3602
\fBversion\fR shell variable).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3603
See also the \fBafsuser\fR and \fBlogout\fR shell variables.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3604
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3605
.B backslash_quote \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3606
If set, backslashes (`\\') always quote `\\', `'', and `"'.  This may make
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3607
complex quoting tasks easier, but it can cause syntax errors in \fIcsh\fR(1)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3608
scripts.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3609
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3610
.B catalog
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3611
The file name of the message catalog.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3612
If set, tcsh use `tcsh.${catalog}' as a message catalog instead of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3613
default `tcsh'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3614
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3615
.B cdpath
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3616
A list of directories in which \fIcd\fR should search for
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3617
subdirectories if they aren't found in the current directory.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3618
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3619
.B color
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3620
If set, it enables color display for the builtin \fBls\-F\fR and it passes
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3621
\fB\-\-color=auto\fR to \fBls\fR.  Alternatively, it can be set to only
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3622
\fBls\-F\fR or only \fBls\fR to enable color to only one command.  Setting
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3623
it to nothing is equivalent to setting it to \fB(ls\-F ls)\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3624
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3625
.B colorcat
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3626
If set, it enables color escape sequence for NLS message files.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3627
And display colorful NLS messages.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3628
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3629
.B command \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3630
If set, the command which was passed to the shell with the \fB-c\fR flag (q.v.).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3631
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3632
.B compat_expr \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3633
If set, the shell will evaluate expressions right to left, like the original
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3634
\fIcsh\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3635
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3636
.B complete \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3637
If set to `enhance', completion 1) ignores case and 2) considers
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3638
periods, hyphens and underscores (`.', `\-' and `_') to be word
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3639
separators and hyphens and underscores to be equivalent. If set to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3640
`igncase', the completion becomes case insensitive.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3641
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3642
.B continue \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3643
If set to a list of commands, the shell will continue the listed
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3644
commands, instead of starting a new one.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3645
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3646
.B continue_args \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3647
Same as continue, but the shell will execute:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3648
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3649
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3650
echo `pwd` $argv > ~/.<cmd>_pause; %<cmd>
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3651
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3652
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3653
.B correct \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3654
If set to `cmd', commands are automatically spelling-corrected.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3655
If set to `complete', commands are automatically completed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3656
If set to `all', the entire command line is corrected.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3657
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3658
.B csubstnonl \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3659
If set, newlines and carriage returns in command substitution are
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3660
replaced by spaces.  Set by default.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3661
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3662
.B cwd
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3663
The full pathname of the current directory.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3664
See also the \fBdirstack\fR and \fBowd\fR shell variables.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3665
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3666
.B dextract \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3667
If set, `pushd +\fIn\fR' extracts the \fIn\fRth directory from the directory
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3668
stack rather than rotating it to the top.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3669
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3670
.B dirsfile \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3671
The default location in which `dirs \-S' and `dirs \-L' look for
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3672
a history file.  If unset, \fI~/.cshdirs\fR is used.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3673
Because only \fI~/.tcshrc\fR is normally sourced before \fI~/.cshdirs\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3674
\fBdirsfile\fR should be set in \fI~/.tcshrc\fR rather than \fI~/.login\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3675
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3676
.B dirstack \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3677
An array of all the directories on the directory stack.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3678
`$dirstack[1]' is the current working directory, `$dirstack[2]'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3679
the first directory on the stack, etc.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3680
Note that the current working directory is `$dirstack[1]' but `=0' in
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3681
directory stack substitutions, etc.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3682
One can change the stack arbitrarily by setting \fBdirstack\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3683
but the first element (the current working directory) is always correct.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3684
See also the \fBcwd\fR and \fBowd\fR shell variables.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3685
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3686
.B dspmbyte \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3687
Has an affect iff 'dspm' is listed as part of the \fBversion\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3688
If set to `euc', it enables display and editing EUC-kanji(Japanese) code.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3689
If set to `sjis', it enables display and editing Shift-JIS(Japanese) code.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3690
If set to `big5', it enables display and editing Big5(Chinese) code.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3691
If set to `utf8', it enables display and editing Utf8(Unicode) code.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3692
If set to the following format, it enables display and editing of original
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3693
multi-byte code format:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3694
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3695
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3696
> set dspmbyte = 0000....(256 bytes)....0000
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3697
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3698
The table requires \fBjust\fR 256 bytes.  Each character of 256 characters
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3699
corresponds (from left to right) to the ASCII codes 0x00, 0x01, ... 0xff.  Each
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3700
character
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3701
.\" (position in this table?)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3702
is set to number 0,1,2 and 3.  Each number has the following meaning:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3703
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3704
  0 ... not used for multi-byte characters.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3705
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3706
  1 ... used for the first byte of a multi-byte character.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3707
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3708
  2 ... used for the second byte of a multi-byte character.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3709
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3710
  3 ... used for both the first byte and second byte of a multi-byte character.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3711
.\" SHK: I tried my best to get the following to be grammatically correct.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3712
.\" However, I still don't understand what's going on here.  In the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3713
 \" following example, there are three bytes, but the text seems to refer to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3714
 \" each nybble as a character.  What's going on here?  It this 3-byte code
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3715
 \" in the table?  The text above seems to imply that there are 256
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3716
 \" characters/bytes in the table.  If I get some more info on this (perhaps
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3717
 \" a complete example), I could fix the text to be grammatically correct.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3718
 \" ([email protected] 1999/09/13)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3719
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3720
  Example:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3721
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3722
If set to `001322', the first character (means 0x00 of the ASCII code) and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3723
second character (means 0x01 of ASCII code) are set to `0'.  Then, it is not
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3724
used for multi-byte characters.  The 3rd character (0x02) is set to '1',
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3725
indicating that it is used for the first byte of a multi-byte character.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3726
The 4th character(0x03) is set '3'.  It is used for both the first byte and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3727
the second byte of a multi-byte character.  The 5th and 6th characters
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3728
(0x04,0x05) are set to '2', indicating that they are used for the second
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3729
byte of a multi-byte character.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3730
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3731
The GNU fileutils version of ls cannot display multi-byte
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3732
filenames without the -N ( --literal ) option.   If you are using
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3733
this version, set the second word of dspmbyte to "ls".  If not, for
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3734
example, "ls-F -l" cannot display multi-byte filenames.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3735
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3736
  Note:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3737
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3738
This variable can only be used if KANJI and DSPMBYTE has been defined at
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3739
compile time.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3740
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3741
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3742
.B dunique \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3743
If set, \fIpushd\fR removes any instances of \fIname\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3744
from the stack before pushing it onto the stack.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3745
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3746
.B echo
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3747
If set, each command with its arguments is echoed just before it is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3748
executed.  For non-builtin commands all expansions occur before
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3749
echoing.  Builtin commands are echoed before command and filename
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3750
substitution, because these substitutions are then done selectively.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3751
Set by the \fB\-x\fR command line option.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3752
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3753
.B echo_style \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3754
The style of the \fIecho\fR builtin.  May be set to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3755
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3756
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3757
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3758
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3759
bsd
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3760
Don't echo a newline if the first argument is `\-n'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3761
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3762
sysv
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3763
Recognize backslashed escape sequences in echo strings.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3764
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3765
both
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3766
Recognize both the `\-n' flag and backslashed escape sequences; the default.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3767
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3768
none
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3769
Recognize neither.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3770
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3771
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3772
Set by default to the local system default.  The BSD and System V
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3773
options are described in the \fIecho\fR(1) man pages on the appropriate
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3774
systems.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3775
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3776
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3777
.B edit \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3778
If set, the command-line editor is used.  Set by default in interactive
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3779
shells.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3780
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3781
.B ellipsis \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3782
If set, the `%c'/`%.' and `%C' prompt sequences (see the \fBprompt\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3783
shell variable) indicate skipped directories with an ellipsis (`...')
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3784
instead of `/<skipped>'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3785
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3786
.B fignore \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3787
Lists file name suffixes to be ignored by completion.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3788
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3789
.B filec
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3790
In \fItcsh\fR, completion is always used and this variable is ignored
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3791
by default. If 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3792
.B edit
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3793
is unset, then the traditional \fIcsh\fR completion is used.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3794
If set in \fIcsh\fR, filename completion is used.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3795
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3796
.B gid \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3797
The user's real group ID.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3798
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3799
.B group \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3800
The user's group name.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3801
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3802
.B highlight
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3803
If set, the incremental search match (in \fIi-search-back\fR and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3804
\fIi-search-fwd\fR) and the region between the mark and the cursor are
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3805
highlighted in reverse video.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3806
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3807
Highlighting requires more frequent terminal writes, which introduces extra
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3808
overhead. If you care about terminal performance, you may want to leave this
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3809
unset.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3810
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3811
.B histchars
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3812
A string value determining the characters used in \fBHistory
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3813
substitution\fR (q.v.).  The first character of its value is used as
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3814
the history substitution character, replacing the default character
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3815
`!'.  The second character of its value replaces the character `^' in
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3816
quick substitutions.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3817
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3818
.B histdup \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3819
Controls handling of duplicate entries in the history list.  If set to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3820
`all' only unique history events are entered in the history list.  If
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3821
set to `prev' and the last history event is the same as the current
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3822
command, then the current command is not entered in the history.  If
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3823
set to `erase' and the same event is found in the history list, that
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3824
old event gets erased and the current one gets inserted.  Note that the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3825
`prev' and `all' options renumber history events so there are no gaps.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3826
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3827
.B histfile \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3828
The default location in which `history \-S' and `history \-L' look for
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3829
a history file.  If unset, \fI~/.history\fR is used.  \fBhistfile\fR is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3830
useful when sharing the same home directory between different machines,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3831
or when saving separate histories on different terminals.  Because only
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3832
\fI~/.tcshrc\fR is normally sourced before \fI~/.history\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3833
\fBhistfile\fR should be set in \fI~/.tcshrc\fR rather than
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3834
\fI~/.login\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3835
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3836
.B histlit \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3837
If set, builtin and editor commands and the \fBsavehist\fR mechanism
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3838
use the literal (unexpanded) form of lines in the history list.  See
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3839
also the \fItoggle-literal-history\fR editor command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3840
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3841
.B history
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3842
The first word indicates the number of history events to save.  The
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3843
optional second word (+) indicates the format in which history is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3844
printed; if not given, `%h\\t%T\\t%R\\n' is used.  The format sequences
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3845
are described below under \fBprompt\fR; note the variable meaning of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3846
`%R'.  Set to `100' by default.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3847
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3848
.B home
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3849
Initialized to the home directory of the invoker.  The filename
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3850
expansion of `\fI~\fR' refers to this variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3851
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3852
.B ignoreeof
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3853
If set to the empty string or `0' and the input device is a terminal,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3854
the \fIend-of-file\fR command (usually generated by the user by typing
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3855
`^D' on an empty line) causes the shell to print `Use "exit" to leave
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3856
tcsh.' instead of exiting.  This prevents the shell from accidentally
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3857
being killed.  Historically this setting exited after 26 successive
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3858
EOF's to avoid infinite loops.  If set to a number \fIn\fR, the shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3859
ignores \fIn - 1\fR consecutive \fIend-of-file\fRs and exits on the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3860
\fIn\fRth.  (+) If unset, `1' is used, i.e., the shell exits on a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3861
single `^D'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3862
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3863
.B implicitcd \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3864
If set, the shell treats a directory name typed as a command as though
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3865
it were a request to change to that directory.  If set to \fIverbose\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3866
the change of directory is echoed to the standard output.  This behavior
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3867
is inhibited in non-interactive shell scripts, or for command strings
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3868
with more than one word.  Changing directory takes precedence over
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3869
executing a like-named command, but it is done after alias
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3870
substitutions.  Tilde and variable expansions work as expected.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3871
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3872
.B inputmode \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3873
If set to `insert' or `overwrite', puts the editor into that input mode
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3874
at the beginning of each line.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3875
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3876
.B killdup \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3877
Controls handling of duplicate entries in the kill ring.  If set to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3878
`all' only unique strings are entered in the kill ring.  If set to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3879
`prev' and the last killed string is the same as the current killed
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3880
string, then the current string is not entered in the ring.  If set
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3881
to `erase' and the same string is found in the kill ring, the old
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3882
string is erased and the current one is inserted.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3883
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3884
.B killring \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3885
Indicates the number of killed strings to keep in memory.  Set to `30'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3886
by default.  If unset or set to less than `2', the shell will only
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3887
keep the most recently killed string.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3888
Strings are put in the killring by the editor commands that delete
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3889
(kill) strings of text, e.g. \fIbackward-delete-word\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3890
\fIkill-line\fR, etc, as well as the \fIcopy-region-as-kill\fR command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3891
The \fIyank\fR editor command will yank the most recently killed string
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3892
into the command-line, while \fIyank-pop\fR (see \fBEditor commands\fR)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3893
can be used to yank earlier killed strings.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3894
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3895
.B listflags \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3896
If set to `x', `a' or `A', or any combination thereof (e.g., `xA'), they
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3897
are used as flags to \fIls\-F\fR, making it act like `ls \-xF', `ls
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3898
\-Fa', `ls \-FA' or a combination (e.g., `ls \-FxA'): `a' shows all
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3899
files (even if they start with a `.'), `A' shows all files but `.' and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3900
`..', and `x' sorts across instead of down.  If the second word of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3901
\fBlistflags\fR is set, it is used as the path to `ls(1)'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3902
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3903
.B listjobs \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3904
If set, all jobs are listed when a job is suspended.  If set to `long',
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3905
the listing is in long format.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3906
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3907
.B listlinks \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3908
If set, the \fIls\-F\fR builtin command shows the type of file to which
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3909
each symbolic link points.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3910
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3911
.B listmax \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3912
The maximum number of items which the \fIlist-choices\fR editor command
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3913
will list without asking first.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3914
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3915
.B listmaxrows \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3916
The maximum number of rows of items which the \fIlist-choices\fR editor
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3917
command will list without asking first.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3918
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3919
.B loginsh \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3920
Set by the shell if it is a login shell.  Setting or unsetting it
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3921
within a shell has no effect.  See also \fBshlvl\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3922
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3923
.B logout \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3924
Set by the shell to `normal' before a normal logout, `automatic' before
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3925
an automatic logout, and `hangup' if the shell was killed by a hangup
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3926
signal (see \fBSignal handling\fR).  See also the \fBautologout\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3927
shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3928
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3929
.B mail
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3930
The names of the files or directories to check for incoming mail,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3931
separated by whitespace, and optionally preceded by a numeric word.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3932
Before each prompt, if 10 minutes have passed since the last check, the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3933
shell checks each file and says `You have new mail.' (or, if \fBmail\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3934
contains multiple files, `You have new mail in \fIname\fR.') if the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3935
filesize is greater than zero in size and has a modification time
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3936
greater than its access time.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3937
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3938
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3939
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3940
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3941
If you are in a login shell, then no mail file is reported unless it has
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3942
been modified after the time the shell has started up, to prevent
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3943
redundant notifications.  Most login programs will tell you whether or not
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3944
you have mail when you log in.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3945
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3946
If a file specified in \fBmail\fR is a directory, the shell will count each
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3947
file within that directory as a separate message, and will report `You have
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3948
\fIn\fR mails.' or `You have \fIn\fR mails in \fIname\fR.' as appropriate.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3949
This functionality is provided primarily for those systems which store mail
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3950
in this manner, such as the Andrew Mail System.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3951
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3952
If the first word of \fBmail\fR is numeric it is taken as a different mail
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3953
checking interval, in seconds.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3954
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3955
Under very rare circumstances, the shell may report `You have mail.' instead
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3956
of `You have new mail.'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3957
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3958
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3959
.B matchbeep \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3960
If set to `never', completion never beeps.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3961
If set to `nomatch', it beeps only when there is no match.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3962
If set to `ambiguous', it beeps when there are multiple matches.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3963
If set to `notunique', it beeps when there is one exact and other longer matches.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3964
If unset, `ambiguous' is used.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3965
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3966
.B nobeep \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3967
If set, beeping is completely disabled.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3968
See also \fBvisiblebell\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3969
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3970
.B noclobber
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3971
If set, restrictions are placed on output redirection to insure that files
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3972
are not accidentally destroyed and that `>>' redirections refer to existing
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3973
files, as described in the \fBInput/output\fR section.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3974
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3975
.B noding
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3976
If set, disable the printing of `DING!' in the \fBprompt\fR time
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3977
specifiers at the change of hour.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3978
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3979
.B noglob
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3980
If set, \fBFilename substitution\fR and \fBDirectory stack substitution\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3981
(q.v.) are inhibited.  This is most useful in shell scripts which do not deal
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3982
with filenames, or after a list of filenames has been obtained and further
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3983
expansions are not desirable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3984
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3985
.B nokanji \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3986
If set and the shell supports Kanji (see the \fBversion\fR shell variable),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3987
it is disabled so that the meta key can be used.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3988
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3989
.B nonomatch
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3990
If set, a \fBFilename substitution\fR or \fBDirectory stack substitution\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3991
(q.v.) which does not match any
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3992
existing files is left untouched rather than causing an error.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3993
It is still an error for the substitution to be
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3994
malformed, e.g., `echo [' still gives an error.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3995
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3996
.B nostat \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3997
A list of directories (or glob-patterns which match directories; see
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3998
\fBFilename substitution\fR) that should not be \fIstat\fR(2)ed during a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  3999
completion operation.  This is usually used to exclude directories which
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4000
take too much time to \fIstat\fR(2), for example \fI/afs\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4001
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4002
.B notify
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4003
If set, the shell announces job completions asynchronously.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4004
The default is to present job completions just before printing a prompt.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4005
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4006
.B oid \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4007
The user's real organization ID.  (Domain/OS only)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4008
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4009
.B owd \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4010
The old working directory, equivalent to the `\-' used by \fIcd\fR and \fIpushd\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4011
See also the \fBcwd\fR and \fBdirstack\fR shell variables.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4012
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4013
.B padhour
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4014
If set, enable the printing of padding '0' for hours, in 24 and 12 hour
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4015
formats.  E.G.: 07:45:42 vs. 7:45:42
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4016
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4017
.B path
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4018
A list of directories in which to look for executable commands.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4019
A null word specifies the current directory.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4020
If there is no \fBpath\fR variable then only full path names will execute.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4021
\fBpath\fR is set by the shell at startup from the \fBPATH\fR environment
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4022
variable or, if \fBPATH\fR does not exist, to a system-dependent default
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4023
something like `(/usr/local/bin /usr/bsd /bin /usr/bin .)'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4024
The shell may put `.' first or last in \fBpath\fR or omit it entirely
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4025
depending on how it was compiled; see the \fBversion\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4026
A shell which is given neither the \fB\-c\fR nor the \fB\-t\fR option
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4027
hashes the contents of the directories in \fBpath\fR after
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4028
reading \fI~/.tcshrc\fR and each time \fBpath\fR is reset.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4029
If one adds a new command to a directory in \fBpath\fR while the shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4030
is active, one may need to do a \fIrehash\fR for the shell to find it.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4031
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4032
.B printexitvalue \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4033
If set and an interactive program exits with a non-zero status, the shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4034
prints `Exit \fBstatus\fR'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4035
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4036
.B prompt
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4037
The string which is printed before reading each command from the terminal.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4038
\fBprompt\fR may include any of the following formatting sequences (+), which
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4039
are replaced by the given information:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4040
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4041
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4042
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4043
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4044
%/
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4045
The current working directory.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4046
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4047
%~
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4048
The current working directory, but with one's home directory
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4049
represented by `~' and other users' home directories represented by
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4050
`~user' as per \fBFilename substitution\fR.  `~user' substitution
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4051
happens only if the shell has already used `~\fIuser\fR' in a pathname
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4052
in the current session.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4053
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4054
%c[[0]\fIn\fR], %.[[0]\fIn\fR]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4055
The trailing component of the current working directory, or \fIn\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4056
trailing components if a digit \fIn\fR is given.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4057
If \fIn\fR begins with `0', the number of skipped components precede
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4058
the trailing component(s) in the format `/<\fIskipped\fR>trailing'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4059
If the \fBellipsis\fR shell variable is set, skipped components
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4060
are represented by an ellipsis so the whole becomes `...trailing'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4061
`~' substitution is done as in `%~' above, but the `~' component
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4062
is ignored when counting trailing components.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4063
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4064
%C
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4065
Like %c, but without `~' substitution.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4066
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4067
%h, %!, !
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4068
The current history event number.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4069
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4070
%M
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4071
The full hostname.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4072
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4073
%m
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4074
The hostname up to the first `.'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4075
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4076
%S (%s)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4077
Start (stop) standout mode.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4078
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4079
%B (%b)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4080
Start (stop) boldfacing mode.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4081
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4082
%U (%u)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4083
Start (stop) underline mode.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4084
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4085
%t, %@
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4086
The time of day in 12-hour AM/PM format.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4087
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4088
%T
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4089
Like `%t', but in 24-hour format (but see the \fBampm\fR shell variable).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4090
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4091
%p
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4092
The `precise' time of day in 12-hour AM/PM format, with seconds.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4093
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4094
%P
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4095
Like `%p', but in 24-hour format (but see the \fBampm\fR shell variable).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4096
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4097
\e\fIc\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4098
\fIc\fR is parsed as in \fIbindkey\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4099
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4100
^\fIc\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4101
\fIc\fR is parsed as in \fIbindkey\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4102
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4103
%%
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4104
A single `%'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4105
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4106
%n
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4107
The user name.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4108
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4109
%j
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4110
The number of jobs.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4111
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4112
%d
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4113
The weekday in `Day' format.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4114
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4115
%D
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4116
The day in `dd' format.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4117
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4118
%w
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4119
The month in `Mon' format.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4120
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4121
%W
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4122
The month in `mm' format.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4123
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4124
%y
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4125
The year in `yy' format.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4126
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4127
%Y
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4128
The year in `yyyy' format.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4129
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4130
%l
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4131
The shell's tty.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4132
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4133
%L
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4134
Clears from the end of the prompt to end of the display or the end of the line.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4135
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4136
%$
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4137
Expands the shell or environment variable name immediately after the `$'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4138
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4139
%#
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4140
`>' (or the first character of the \fBpromptchars\fR shell variable)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4141
for normal users, `#' (or the second character of \fBpromptchars\fR)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4142
for the superuser.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4143
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4144
%{\fIstring\fR%}
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4145
Includes \fIstring\fR as a literal escape sequence.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4146
It should be used only to change terminal attributes and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4147
should not move the cursor location.  This
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4148
cannot be the last sequence in \fBprompt\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4149
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4150
%?
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4151
The return code of the command executed just before the prompt.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4152
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4153
%R
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4154
In \fBprompt2\fR, the status of the parser.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4155
In \fBprompt3\fR, the corrected string.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4156
In \fBhistory\fR, the history string.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4157
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4158
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4159
`%B', `%S', `%U' and `%{\fIstring\fR%}' are available in only
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4160
eight-bit-clean shells; see the \fBversion\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4161
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4162
The bold, standout and underline sequences are often used to distinguish a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4163
superuser shell.  For example,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4164
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4165
> set prompt = "%m [%h] %B[%@]%b [%/] you rang? "
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4166
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4167
tut [37] \fB[2:54pm]\fR [/usr/accts/sys] you rang? _
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4168
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4169
If `%t', `%@', `%T', `%p', or `%P' is used, and \fBnoding\fR is not set,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4170
then print `DING!' on the change of hour (i.e, `:00' minutes) instead of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4171
the actual time.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4172
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4173
Set by default to `%# ' in interactive shells.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4174
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4175
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4176
.B prompt2 \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4177
The string with which to prompt in \fIwhile\fR and \fIforeach\fR loops and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4178
after lines ending in `\\'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4179
The same format sequences may be used as in \fBprompt\fR (q.v.);
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4180
note the variable meaning of `%R'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4181
Set by default to `%R? ' in interactive shells.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4182
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4183
.B prompt3 \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4184
The string with which to prompt when confirming automatic spelling correction.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4185
The same format sequences may be used as in \fBprompt\fR (q.v.);
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4186
note the variable meaning of `%R'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4187
Set by default to `CORRECT>%R (y|n|e|a)? ' in interactive shells.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4188
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4189
.B promptchars \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4190
If set (to a two-character string), the `%#' formatting sequence in the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4191
\fBprompt\fR shell variable is replaced with the first character for
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4192
normal users and the second character for the superuser.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4193
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4194
.B pushdtohome \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4195
If set, \fIpushd\fR without arguments does `pushd ~', like \fIcd\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4196
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4197
.B pushdsilent \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4198
If set, \fIpushd\fR and \fIpopd\fR do not print the directory stack.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4199
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4200
.B recexact \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4201
If set, completion completes on an exact match even if a longer match is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4202
possible.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4203
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4204
.B recognize_only_executables \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4205
If set, command listing displays only files in the path that are
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4206
executable.  Slow.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4207
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4208
.B rmstar \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4209
If set, the user is prompted before `rm *' is executed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4210
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4211
.B rprompt \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4212
The string to print on the right-hand side of the screen (after
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4213
the command input) when the prompt is being displayed on the left.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4214
It recognizes the same formatting characters as \fBprompt\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4215
It will automatically disappear and reappear as necessary, to ensure that
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4216
command input isn't obscured, and will appear only if the prompt,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4217
command input, and itself will fit together on the first line.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4218
If \fBedit\fR isn't set, then \fBrprompt\fR will be printed after
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4219
the prompt and before the command input.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4220
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4221
.B savedirs \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4222
If set, the shell does `dirs \-S' before exiting.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4223
If the first word is set to a number, at most that many directory stack
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4224
entries are saved.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4225
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4226
.B savehist
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4227
If set, the shell does `history \-S' before exiting.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4228
If the first word is set to a number, at most that many lines are saved.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4229
(The number must be less than or equal to \fBhistory\fR.)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4230
If the second word is set to `merge', the history list is merged with
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4231
the existing history file instead of replacing it (if there is one) and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4232
sorted by time stamp and the most recent events are retained.  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4233
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4234
.B sched \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4235
The format in which the \fIsched\fR builtin command prints scheduled events;
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4236
if not given, `%h\\t%T\\t%R\\n' is used.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4237
The format sequences are described above under \fBprompt\fR;
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4238
note the variable meaning of `%R'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4239
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4240
.B shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4241
The file in which the shell resides.  This is used in forking
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4242
shells to interpret files which have execute bits set, but
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4243
which are not executable by the system.  (See the description
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4244
of \fBBuiltin and non-builtin command execution\fR.)  Initialized to the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4245
(system-dependent) home of the shell.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4246
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4247
.B shlvl \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4248
The number of nested shells.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4249
Reset to 1 in login shells.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4250
See also \fBloginsh\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4251
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4252
.B status
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4253
The status returned by the last command.  If it terminated
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4254
abnormally, then 0200 is added to the status.  Builtin commands
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4255
which fail return exit status `1', all other builtin commands
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4256
return status `0'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4257
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4258
.B symlinks \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4259
Can be set to several different values to control symbolic link (`symlink')
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4260
resolution:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4261
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4262
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4263
If set to `chase', whenever the current directory changes to a directory
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4264
containing a symbolic link, it is expanded to the real name of the directory
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4265
to which the link points.  This does not work for the user's home directory;
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4266
this is a bug.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4267
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4268
If set to `ignore', the shell tries to construct a current directory
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4269
relative to the current directory before the link was crossed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4270
This means that \fIcd\fRing through a symbolic link and then `cd ..'ing
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4271
returns one to the original directory.  This affects only builtin commands
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4272
and filename completion.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4273
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4274
If set to `expand', the shell tries to fix symbolic links by actually expanding
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4275
arguments which look like path names.  This affects any command, not just
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4276
builtins.  Unfortunately, this does not work for hard-to-recognize filenames,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4277
such as those embedded in command options.  Expansion may be prevented by
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4278
quoting.  While this setting is usually the most convenient, it is sometimes
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4279
misleading and sometimes confusing when it fails to recognize an argument
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4280
which should be expanded.  A compromise is to use `ignore' and use the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4281
editor command \fInormalize-path\fR (bound by default to ^X-n) when necessary.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4282
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4283
Some examples are in order.  First, let's set up some play directories:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4284
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4285
> cd /tmp
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4286
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4287
> mkdir from from/src to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4288
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4289
> ln \-s from/src to/dst
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4290
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4291
Here's the behavior with \fBsymlinks\fR unset,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4292
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4293
> cd /tmp/to/dst; echo $cwd
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4294
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4295
/tmp/to/dst
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4296
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4297
> cd ..; echo $cwd
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4298
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4299
/tmp/from
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4300
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4301
here's the behavior with \fBsymlinks\fR set to `chase',
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4302
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4303
> cd /tmp/to/dst; echo $cwd
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4304
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4305
/tmp/from/src
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4306
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4307
> cd ..; echo $cwd
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4308
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4309
/tmp/from
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4310
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4311
here's the behavior with \fBsymlinks\fR set to `ignore',
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4312
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4313
> cd /tmp/to/dst; echo $cwd
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4314
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4315
/tmp/to/dst
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4316
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4317
> cd ..; echo $cwd
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4318
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4319
/tmp/to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4320
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4321
and here's the behavior with \fBsymlinks\fR set to `expand'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4322
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4323
> cd /tmp/to/dst; echo $cwd
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4324
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4325
/tmp/to/dst
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4326
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4327
> cd ..; echo $cwd
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4328
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4329
/tmp/to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4330
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4331
> cd /tmp/to/dst; echo $cwd
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4332
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4333
/tmp/to/dst
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4334
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4335
> cd ".."; echo $cwd
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4336
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4337
/tmp/from
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4338
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4339
> /bin/echo ..
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4340
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4341
/tmp/to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4342
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4343
> /bin/echo ".."
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4344
.br
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4345
\&..
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4346
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4347
Note that `expand' expansion 1) works just like `ignore' for builtins
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4348
like \fIcd\fR, 2) is prevented by quoting, and 3) happens before
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4349
filenames are passed to non-builtin commands.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4350
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4351
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4352
.B tcsh \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4353
The version number of the shell in the format `R.VV.PP',
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4354
where `R' is the major release number, `VV' the current version
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4355
and `PP' the patchlevel.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4356
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4357
.B term
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4358
The terminal type.  Usually set in \fI~/.login\fR as described under
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4359
\fBStartup and shutdown\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4360
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4361
.B time
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4362
If set to a number, then the \fItime\fR builtin (q.v.) executes automatically
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4363
after each command which takes more than that many CPU seconds.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4364
If there is a second word, it is used as a format string for the output
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4365
of the \fItime\fR builtin.  (u) The following sequences may be used in the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4366
format string:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4367
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4368
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4369
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4370
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4371
%U
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4372
The time the process spent in user mode in cpu seconds.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4373
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4374
%S
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4375
The time the process spent in kernel mode in cpu seconds.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4376
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4377
%E
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4378
The elapsed (wall clock) time in seconds.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4379
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4380
%P
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4381
The CPU percentage computed as (%U + %S) / %E.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4382
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4383
%W
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4384
Number of times the process was swapped.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4385
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4386
%X
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4387
The average amount in (shared) text space used in Kbytes.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4388
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4389
%D
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4390
The average amount in (unshared) data/stack space used in Kbytes.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4391
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4392
%K
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4393
The total space used (%X + %D) in Kbytes.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4394
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4395
%M
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4396
The maximum memory the process had in use at any time in Kbytes.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4397
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4398
%F
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4399
The number of major page faults (page needed to be brought from disk).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4400
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4401
%R
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4402
The number of minor page faults.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4403
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4404
%I
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4405
The number of input operations.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4406
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4407
%O
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4408
The number of output operations.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4409
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4410
%r
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4411
The number of socket messages received.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4412
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4413
%s
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4414
The number of socket messages sent.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4415
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4416
%k
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4417
The number of signals received.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4418
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4419
%w
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4420
The number of voluntary context switches (waits).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4421
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4422
%c
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4423
The number of involuntary context switches.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4424
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4425
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4426
Only the first four sequences are supported on systems without BSD resource
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4427
limit functions.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4428
The default time format is `%Uu %Ss %E %P %X+%Dk %I+%Oio %Fpf+%Ww' for
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4429
systems that support resource usage reporting and `%Uu %Ss %E %P' for
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4430
systems that do not.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4431
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4432
Under Sequent's DYNIX/ptx, %X, %D, %K, %r and %s are not
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4433
available, but the following additional sequences are:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4434
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4435
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4436
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4437
%Y
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4438
The number of system calls performed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4439
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4440
%Z
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4441
The number of pages which are zero-filled on demand.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4442
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4443
%i
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4444
The number of times a process's resident set size was increased by the kernel.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4445
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4446
%d
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4447
The number of times a process's resident set size was decreased by the kernel.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4448
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4449
%l
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4450
The number of read system calls performed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4451
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4452
%m
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4453
The number of write system calls performed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4454
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4455
%p
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4456
The number of reads from raw disk devices.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4457
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4458
%q
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4459
The number of writes to raw disk devices.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4460
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4461
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4462
and the default time format is `%Uu %Ss %E %P %I+%Oio %Fpf+%Ww'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4463
Note that the CPU percentage can be higher than 100% on multi-processors.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4464
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4465
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4466
.B tperiod \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4467
The period, in minutes, between executions of the \fIperiodic\fR special alias.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4468
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4469
.B tty \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4470
The name of the tty, or empty if not attached to one.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4471
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4472
.B uid \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4473
The user's real user ID.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4474
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4475
.B user
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4476
The user's login name.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4477
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4478
.B verbose
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4479
If set, causes the words of each
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4480
command to be printed, after history substitution (if any).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4481
Set by the \fB\-v\fR command line option.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4482
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4483
.B version \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4484
The version ID stamp.  It contains the shell's version number (see \fBtcsh\fR),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4485
origin, release date, vendor, operating system and machine (see \fBVENDOR\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4486
\fBOSTYPE\fR and \fBMACHTYPE\fR) and a comma-separated
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4487
list of options which were set at compile time.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4488
Options which are set by default in the distribution are noted.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4489
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4490
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4491
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4492
.TP 6
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4493
8b
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4494
The shell is eight bit clean; default
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4495
.TP 6
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4496
7b
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4497
The shell is not eight bit clean
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4498
.TP 6
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4499
wide
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4500
The shell is multibyte encoding clean (like UTF-8)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4501
.TP 6
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4502
nls
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4503
The system's NLS is used; default for systems with NLS
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4504
.TP 6
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4505
lf
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4506
Login shells execute \fI/etc/.login\fR before instead of after
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4507
\fI/etc/.cshrc\fR and \fI~/.login\fR before instead of after
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4508
\fI~/.tcshrc\fR and \fI~/.history\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4509
.TP 6
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4510
dl
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4511
`.' is put last in \fBpath\fR for security; default
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4512
.TP 6
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4513
nd
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4514
`.' is omitted from \fBpath\fR for security
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4515
.TP 6
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4516
vi
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4517
\fIvi\fR-style editing is the default rather than \fIemacs\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4518
.TP 6
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4519
dtr
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4520
Login shells drop DTR when exiting
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4521
.TP 6
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4522
bye
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4523
\fIbye\fR is a synonym for \fIlogout\fR and \fIlog\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4524
is an alternate name for \fIwatchlog\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4525
.TP 6
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4526
al
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4527
\fBautologout\fR is enabled; default
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4528
.TP 6
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4529
kan
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4530
Kanji is used if appropriate according to locale settings,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4531
unless the \fBnokanji\fR shell variable is set
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4532
.TP 6
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4533
sm
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4534
The system's \fImalloc\fR(3C) is used
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4535
.TP 6
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4536
hb
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4537
The `#!<program> <args>' convention is emulated when executing shell scripts
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4538
.TP 6
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4539
ng
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4540
The \fInewgrp\fR builtin is available
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4541
.TP 6
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4542
rh
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4543
The shell attempts to set the \fBREMOTEHOST\fR environment variable
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4544
.TP 6
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4545
afs
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4546
The shell verifies your password with the kerberos server if local
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4547
authentication fails.  The \fBafsuser\fR shell variable or the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4548
\fBAFSUSER\fR environment variable override your local username if set.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4549
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4550
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4551
An administrator may enter additional strings to indicate differences
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4552
in the local version.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4553
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4554
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4555
.B visiblebell \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4556
If set, a screen flash is used rather than the audible bell.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4557
See also \fBnobeep\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4558
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4559
.B watch \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4560
A list of user/terminal pairs to watch for logins and logouts.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4561
If either the user is `any' all terminals are watched for the given user
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4562
and vice versa.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4563
Setting \fBwatch\fR to `(any any)' watches all users and terminals.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4564
For example,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4565
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4566
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4567
set watch = (george ttyd1 any console $user any)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4568
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4569
reports activity of the user `george' on ttyd1, any user on the console, and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4570
oneself (or a trespasser) on any terminal.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4571
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4572
Logins and logouts are checked every 10 minutes by default, but the first
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4573
word of \fBwatch\fR can be set to a number to check every so many minutes.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4574
For example,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4575
.IP "" 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4576
set watch = (1 any any)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4577
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4578
reports any login/logout once every minute.  For the impatient, the \fIlog\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4579
builtin command triggers a \fBwatch\fR report at any time.  All current logins
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4580
are reported (as with the \fIlog\fR builtin) when \fBwatch\fR is first set.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4581
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4582
The \fBwho\fR shell variable controls the format of \fBwatch\fR reports.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4583
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4584
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4585
.B who \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4586
The format string for \fBwatch\fR messages.  The following sequences
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4587
are replaced by the given information:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4588
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4589
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4590
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4591
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4592
%n
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4593
The name of the user who logged in/out.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4594
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4595
%a
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4596
The observed action, i.e., `logged on', `logged off' or `replaced \fIolduser\fR on'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4597
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4598
%l
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4599
The terminal (tty) on which the user logged in/out.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4600
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4601
%M
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4602
The full hostname of the remote host, or `local' if the login/logout was
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4603
from the local host.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4604
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4605
%m
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4606
The hostname of the remote host up to the first `.'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4607
The full name is printed if it is an IP address or an X Window System display.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4608
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4609
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4610
%M and %m are available on only systems that store the remote hostname in
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4611
\fI/etc/utmp\fR or
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4612
\fI/etc/utmpx\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4613
If unset, `%n has %a %l from %m.' is used, or `%n has %a %l.' on systems
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4614
which don't store the remote hostname.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4615
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4616
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4617
.B wordchars \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4618
A list of non-alphanumeric characters to be considered part of a word by the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4619
\fIforward-word\fR, \fIbackward-word\fR etc., editor commands.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4620
If unset, `*?_\-.[]~=' is used.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4621
.SH ENVIRONMENT
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4622
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4623
.B AFSUSER \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4624
Equivalent to the \fBafsuser\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4625
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4626
.B COLUMNS
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4627
The number of columns in the terminal.  See \fBTerminal management\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4628
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4629
.B DISPLAY
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4630
Used by X Window System (see \fIX\fR(5)).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4631
If set, the shell does not set \fBautologout\fR (q.v.).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4632
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4633
.B EDITOR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4634
The pathname to a default editor.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4635
See also the \fBVISUAL\fR environment variable
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4636
and the \fIrun-fg-editor\fR editor command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4637
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4638
.B GROUP \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4639
Equivalent to the \fBgroup\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4640
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4641
.B HOME
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4642
Equivalent to the \fBhome\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4643
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4644
.B HOST \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4645
Initialized to the name of the machine on which the shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4646
is running, as determined by the \fIgethostname\fR(3C) library call.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4647
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4648
.B HOSTTYPE \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4649
Initialized to the type of machine on which the shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4650
is running, as determined at compile time.  This variable is obsolete and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4651
will be removed in a future version.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4652
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4653
.B HPATH \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4654
A colon-separated list of directories in which the \fIrun-help\fR editor
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4655
command looks for command documentation.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4656
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4657
.B LANG
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4658
Gives the preferred character environment.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4659
See \fBNative Language System support\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4660
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4661
.B LC_CTYPE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4662
If set, only ctype character handling is changed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4663
See \fBNative Language System support\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4664
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4665
.B LINES
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4666
The number of lines in the terminal.  See \fBTerminal management\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4667
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4668
.B LS_COLORS
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4669
The format of this variable is reminiscent of the \fBtermcap(5)\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4670
file format; a colon-separated list of expressions of the form
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4671
"\fIxx=string\fR", where "\fIxx\fR" is a two-character variable name.  The
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4672
variables with their associated defaults are:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4673
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4674
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4675
.RS +4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4676
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4677
.TP 12
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4678
no	0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4679
Normal (non-filename) text
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4680
.TP 12
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4681
fi	0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4682
Regular file
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4683
.TP 12
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4684
di	01;34
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4685
Directory
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4686
.TP 12
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4687
ln	01;36
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4688
Symbolic link
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4689
.TP 12
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4690
pi	33
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4691
Named pipe (FIFO)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4692
.TP 12
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4693
so	01;35
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4694
Socket
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4695
.TP 12
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4696
do	01;35
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4697
Door
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4698
.TP 12
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4699
bd	01;33
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4700
Block device
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4701
.TP 12
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4702
cd	01;32
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4703
Character device
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4704
.TP 12
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4705
ex	01;32
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4706
Executable file
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4707
.TP 12
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4708
mi	(none)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4709
Missing file (defaults to fi)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4710
.TP 12
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4711
or	(none)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4712
Orphaned symbolic link (defaults to ln)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4713
.TP 12
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4714
lc	^[[
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4715
Left code
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4716
.TP 12
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4717
rc	m
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4718
Right code
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4719
.TP 12
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4720
ec	(none)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4721
End code (replaces lc+no+rc)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4722
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4723
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4724
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4725
You need to include only the variables you want to change from
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4726
the default.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4727
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4728
File names can also be colorized based on filename extension.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4729
This is specified in the \fBLS_COLORS\fR variable using the syntax
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4730
\fB"*ext=string"\fR.  For example, using ISO 6429 codes, to color
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4731
all C\-language source files blue you would specify \fB"*.c=34"\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4732
This would color all files ending in \fB.c\fR in blue (34) color.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4733
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4734
Control characters can be written either in C\-style\-escaped
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4735
notation, or in stty\-like ^\-notation.  The C\-style notation
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4736
adds \fB^[\fR for Escape, \fB\_\fR for a normal space character,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4737
and \fB?\fR for Delete.  In addition, the \fB^[\fR escape character
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4738
can be used to override the default interpretation of \fB^[\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4739
\fB^\fR, \fB:\fR and \fB=\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4740
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4741
Each file will be written as \fB<lc>\fR \fB<color-code>\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4742
\fB<rc>\fR \fB<filename>\fR \fB<ec>\fR.  If the \fB<ec>\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4743
code is undefined, the sequence \fB<lc>\fR \fB<no>
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4744
\fB<rc>\fR will be used instead.  This is generally more convenient
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4745
to use, but less general.  The left, right and end codes are
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4746
provided so you don't have to type common parts over and over
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4747
again and to support weird terminals; you will generally not
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4748
need to change them at all unless your terminal does not use
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4749
ISO 6429 color sequences but a different system.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4750
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4751
If your terminal does use ISO 6429 color codes, you can
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4752
compose the type codes (i.e., all except the \fBlc\fR, \fBrc\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4753
and \fBec\fR codes) from numerical commands separated by semicolons.  The
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4754
most common commands are:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4755
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4756
.RS +8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4757
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4758
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4759
0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4760
to restore default color
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4761
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4762
1
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4763
for brighter colors
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4764
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4765
4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4766
for underlined text
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4767
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4768
5
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4769
for flashing text
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4770
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4771
30
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4772
for black foreground
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4773
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4774
31
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4775
for red foreground
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4776
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4777
32
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4778
for green foreground
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4779
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4780
33
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4781
for yellow (or brown) foreground
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4782
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4783
34
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4784
for blue foreground
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4785
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4786
35
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4787
for purple foreground
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4788
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4789
36
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4790
for cyan foreground
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4791
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4792
37
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4793
for white (or gray) foreground
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4794
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4795
40
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4796
for black background
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4797
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4798
41
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4799
for red background
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4800
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4801
42
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4802
for green background
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4803
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4804
43
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4805
for yellow (or brown) background
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4806
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4807
44
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4808
for blue background
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4809
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4810
45
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4811
for purple background
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4812
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4813
46
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4814
for cyan background
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4815
.TP 4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4816
47
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4817
for white (or gray) background
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4818
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4819
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4820
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4821
Not all commands will work on all systems or display devices.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4822
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4823
A few terminal programs do not recognize the default end code
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4824
properly.  If all text gets colorized after you do a directory
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4825
listing, try changing the \fBno\fR and \fBfi\fR codes from 0 to the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4826
numerical codes for your standard fore- and background colors.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4827
.RE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4828
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4829
.B MACHTYPE \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4830
The machine type (microprocessor class or machine model), as determined at compile time.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4831
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4832
.B NOREBIND \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4833
If set, printable characters are not rebound to \fIself-insert-command\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4834
See \fBNative Language System support\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4835
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4836
.B OSTYPE \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4837
The operating system, as determined at compile time.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4838
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4839
.B PATH
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4840
A colon-separated list of directories in which to look for executables.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4841
Equivalent to the \fBpath\fR shell variable, but in a different format.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4842
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4843
.B PWD \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4844
Equivalent to the \fBcwd\fR shell variable, but not synchronized to it;
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4845
updated only after an actual directory change.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4846
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4847
.B REMOTEHOST \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4848
The host from which the user has logged in remotely, if this is the case and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4849
the shell is able to determine it.  Set only if the shell was so compiled;
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4850
see the \fBversion\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4851
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4852
.B SHLVL \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4853
Equivalent to the \fBshlvl\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4854
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4855
.B SYSTYPE \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4856
The current system type.  (Domain/OS only)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4857
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4858
.B TERM
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4859
Equivalent to the \fBterm\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4860
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4861
.B TERMCAP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4862
The terminal capability string.  See \fBTerminal management\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4863
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4864
.B USER
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4865
Equivalent to the \fBuser\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4866
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4867
.B VENDOR \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4868
The vendor, as determined at compile time.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4869
.TP 8
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4870
.B VISUAL
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4871
The pathname to a default full-screen editor.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4872
See also the \fBEDITOR\fR environment variable
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4873
and the \fIrun-fg-editor\fR editor command.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4874
.SH FILES
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4875
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4876
.TP 16
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4877
.I /etc/csh.cshrc
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4878
Read first by every shell.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4879
ConvexOS, Stellix and Intel use \fI/etc/cshrc\fR and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4880
NeXTs use \fI/etc/cshrc.std\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4881
A/UX, AMIX, Cray and IRIX have no equivalent in \fIcsh\fR(1),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4882
but read this file in \fItcsh\fR anyway.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4883
Solaris does not have it either, but \fItcsh\fR reads \fI/etc/.cshrc\fR.  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4884
.TP 16
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4885
.I /etc/csh.login
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4886
Read by login shells after \fI/etc/csh.cshrc\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4887
ConvexOS, Stellix and Intel use \fI/etc/login\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4888
NeXTs use \fI/etc/login.std\fR, Solaris uses \fI/etc/.login\fR and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4889
A/UX, AMIX, Cray and IRIX use \fI/etc/cshrc\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4890
.TP 16
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4891
.I ~/.tcshrc \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4892
Read by every shell after \fI/etc/csh.cshrc\fR or its equivalent.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4893
.TP 16
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4894
.I ~/.cshrc
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4895
Read by every shell, if \fI~/.tcshrc\fR doesn't exist,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4896
after \fI/etc/csh.cshrc\fR or its equivalent.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4897
This manual uses `\fI~/.tcshrc\fR' to mean `\fI~/.tcshrc\fR or,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4898
if \fI~/.tcshrc\fR is not found, \fI~/.cshrc\fR'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4899
.TP 16
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4900
.I ~/.history
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4901
Read by login shells after \fI~/.tcshrc\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4902
if \fBsavehist\fR is set, but see also \fBhistfile\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4903
.TP 16
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4904
.I ~/.login
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4905
Read by login shells after \fI~/.tcshrc\fR or \fI~/.history\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4906
The shell may be compiled to read \fI~/.login\fR before instead of after
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4907
\fI~/.tcshrc\fR and \fI~/.history\fR; see the \fBversion\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4908
.TP 16
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4909
.I ~/.cshdirs \fR(+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4910
Read by login shells after \fI~/.login\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4911
if \fBsavedirs\fR is set, but see also \fBdirsfile\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4912
.TP 16
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4913
.I /etc/csh.logout
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4914
Read by login shells at logout.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4915
ConvexOS, Stellix and Intel use \fI/etc/logout\fR and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4916
NeXTs use \fI/etc/logout.std\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4917
A/UX, AMIX, Cray and IRIX have no equivalent in \fIcsh\fR(1),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4918
but read this file in \fItcsh\fR anyway.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4919
Solaris 2.x does not have it either, but \fItcsh\fR reads \fI/etc/.logout\fR.  (+)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4920
.TP 16
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4921
.I ~/.logout
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4922
Read by login shells at logout after \fI/etc/csh.logout\fR or its equivalent.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4923
.TP 16
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4924
.I /bin/sh
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4925
Used to interpret shell scripts not starting with a `#'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4926
.TP 16
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4927
.I /tmp/sh*
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4928
Temporary file for `<<'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4929
.TP 16
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4930
.I /etc/passwd
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4931
Source of home directories for `~name' substitutions.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4932
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4933
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4934
The order in which startup files are read may differ if the shell was so
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4935
compiled; see \fBStartup and shutdown\fR and the \fBversion\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4936
.SH "NEW FEATURES (+)"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4937
This manual describes \fItcsh\fR as a single entity,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4938
but experienced \fIcsh\fR(1) users will want to pay special attention to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4939
\fItcsh\fR's new features.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4940
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4941
A command-line editor, which supports GNU Emacs or \fIvi\fR(1)-style
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4942
key bindings.  See \fBThe command-line editor\fR and \fBEditor commands\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4943
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4944
Programmable, interactive word completion and listing.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4945
See \fBCompletion and listing\fR and the \fIcomplete\fR and \fIuncomplete\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4946
builtin commands.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4947
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4948
\fBSpelling correction\fR (q.v.) of filenames, commands and variables.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4949
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4950
\fBEditor commands\fR (q.v.) which perform other useful functions in the middle of
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4951
typed commands, including documentation lookup (\fIrun-help\fR),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4952
quick editor restarting (\fIrun-fg-editor\fR) and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4953
command resolution (\fIwhich-command\fR).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4954
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4955
An enhanced history mechanism.  Events in the history list are time-stamped.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4956
See also the \fIhistory\fR command and its associated shell variables,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4957
the previously undocumented `#' event specifier and new modifiers
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4958
under \fBHistory substitution\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4959
the \fI*-history\fR, \fIhistory-search-*\fR, \fIi-search-*\fR, \fIvi-search-*\fR and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4960
\fItoggle-literal-history\fR editor commands
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4961
and the \fBhistlit\fR shell variable.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4962
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4963
Enhanced directory parsing and directory stack handling.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4964
See the \fIcd\fR, \fIpushd\fR, \fIpopd\fR and \fIdirs\fR commands and their associated
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4965
shell variables, the description of \fBDirectory stack substitution\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4966
the \fBdirstack\fR, \fBowd\fR and \fBsymlinks\fR shell variables and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4967
the \fInormalize-command\fR and \fInormalize-path\fR editor commands.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4968
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4969
Negation in glob-patterns.  See \fBFilename substitution\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4970
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4971
New \fBFile inquiry operators\fR (q.v.) and a \fIfiletest\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4972
builtin which uses them.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4973
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4974
A variety of \fBAutomatic, periodic and timed events\fR (q.v.) including
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4975
scheduled events, special aliases, automatic logout and terminal locking,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4976
command timing and watching for logins and logouts.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4977
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4978
Support for the Native Language System
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4979
(see \fBNative Language System support\fR),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4980
OS variant features
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4981
(see \fBOS variant support\fR and the \fBecho_style\fR shell variable)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4982
and system-dependent file locations (see \fBFILES\fR).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4983
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4984
Extensive terminal-management capabilities.  See \fBTerminal management\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4985
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4986
New builtin commands including \fIbuiltins\fR, \fIhup\fR, \fIls\-F\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4987
\fInewgrp\fR, \fIprintenv\fR, \fIwhich\fR and \fIwhere\fR (q.v.).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4988
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4989
New variables that make useful information easily available to the shell.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4990
See the \fBgid\fR, \fBloginsh\fR, \fBoid\fR, \fBshlvl\fR, \fBtcsh\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4991
\fBtty\fR, \fBuid\fR and \fBversion\fR shell variables and the \fBHOST\fR,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4992
\fBREMOTEHOST\fR, \fBVENDOR\fR, \fBOSTYPE\fR and \fBMACHTYPE\fR environment
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4993
variables.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4994
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4995
A new syntax for including useful information in the prompt string
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4996
(see \fBprompt\fR).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4997
and special prompts for loops and spelling correction
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4998
(see \fBprompt2\fR and \fBprompt3\fR).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  4999
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5000
Read-only variables.  See \fBVariable substitution\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5001
.SH BUGS
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5002
When a suspended command is restarted, the shell prints the directory
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5003
it started in if this is different from the current directory.  This can
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5004
be misleading (i.e., wrong) as the job may have changed directories internally.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5005
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5006
Shell builtin functions are not stoppable/restartable.  Command sequences
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5007
of the form `a ; b ; c' are also not handled gracefully when stopping is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5008
attempted.  If you suspend `b', the shell will then immediately execute
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5009
`c'.  This is especially noticeable if this expansion results from an
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5010
\fIalias\fR.  It suffices to place the sequence of commands in ()'s to force it
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5011
to a subshell, i.e., `( a ; b ; c )'.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5012
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5013
Control over tty output after processes are started is primitive; perhaps
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5014
this will inspire someone to work on a good virtual terminal interface.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5015
In a virtual terminal interface much more interesting things could be
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5016
done with output control.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5017
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5018
Alias substitution is most often used to clumsily simulate shell procedures;
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5019
shell procedures should be provided rather than aliases.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5020
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5021
Commands within loops are not placed in the history
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5022
list.  Control structures should be parsed rather than being recognized as
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5023
built-in commands.  This would allow control commands to be placed anywhere,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5024
to be combined with `|', and to be used with `&' and `;' metasyntax.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5025
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5026
\fIforeach\fR doesn't ignore here documents when looking for its \fIend\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5027
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5028
It should be possible to use the `:' modifiers on the output of command
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5029
substitutions.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5030
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5031
The screen update for lines longer than the screen width is very poor
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5032
if the terminal cannot move the cursor up (i.e., terminal type `dumb').
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5033
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5034
\fBHPATH\fR and \fBNOREBIND\fR don't need to be environment variables.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5035
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5036
Glob-patterns which do not use `?', `*' or `[]' or which use `{}' or `~'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5037
are not negated correctly.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5038
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5039
The single-command form of \fIif\fR does output redirection even if
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5040
the expression is false and the command is not executed.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5041
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5042
\fIls\-F\fR includes file identification characters when sorting filenames
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5043
and does not handle control characters in filenames well.  It cannot be
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5044
interrupted.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5045
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5046
Command substitution supports multiple commands and conditions, but not
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5047
cycles or backward \fIgoto\fRs.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5048
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5049
Report bugs at http://bugs.gw.com/, preferably with fixes.  If you want to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5050
help maintain and test tcsh, send mail to [email protected] with the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5051
text `subscribe tcsh' on a line by itself in the body.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5052
.SH THE T IN TCSH
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5053
In 1964, DEC produced the PDP-6.  The PDP-10 was a later re-implementation.  It
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5054
was re-christened the DECsystem-10 in 1970 or so when DEC brought out the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5055
second model, the KI10.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5056
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5057
TENEX was created at Bolt, Beranek & Newman (a Cambridge, Massachusetts
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5058
think tank) in
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5059
1972 as an experiment in demand-paged virtual memory operating systems.  They
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5060
built a new pager for the DEC PDP-10 and created the OS to go with it.  It was
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5061
extremely successful in academia.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5062
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5063
In 1975, DEC brought out a new model of the PDP-10, the KL10; they intended to
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5064
have only a version of TENEX, which they had licensed from BBN, for the new
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5065
box.  They called their version TOPS-20 (their capitalization is trademarked).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5066
A lot of TOPS-10 users (`The OPerating System for PDP-10') objected; thus DEC
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5067
found themselves supporting two incompatible systems on the same hardware--but
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5068
then there were 6 on the PDP-11!
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5069
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5070
TENEX, and TOPS-20 to version 3, had command completion
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5071
via a user-code-level subroutine library called ULTCMD.  With version 3, DEC
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5072
moved all that capability and more into the monitor (`kernel' for you Unix
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5073
types), accessed by the COMND% JSYS (`Jump to SYStem' instruction, the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5074
supervisor call mechanism [are my IBM roots also showing?]).
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5075
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5076
The creator of tcsh was impressed by this feature and several others of TENEX
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5077
and TOPS-20, and created a version of csh which mimicked them.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5078
.SH LIMITATIONS
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5079
The system limits argument lists to ARG_MAX characters.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5080
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5081
The number of arguments to a command which involves filename expansion is
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5082
limited to 1/6th the number of characters allowed in an argument list.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5083
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5084
Command substitutions may substitute no more characters than are allowed in
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5085
an argument list.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5086
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5087
To detect looping, the shell restricts the number of \fIalias\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5088
substitutions on a single line to 20.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5089
.SH "SEE ALSO"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5090
csh(1), emacs(1), ls(1), newgrp(1), sh(1), stty(1), su(1M),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5091
tset(1B), vi(1), X(5), access(2), execve(2), fork(2), killpg(3C),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5092
pipe(2), setrlimit(2), sigvec(3UCB), stat(2), umask(2), vfork(2), wait(2),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5093
malloc(3C), setlocale(3C), tty(7D), a.out(4), terminfo(4), environ(5),
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5094
termio(7I), Introduction to the C Shell
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5095
.SH VERSION
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5096
This manual documents tcsh 6.17.00 (Astron) 2009-07-10.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5097
.SH AUTHORS
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5098
.PD 0
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5099
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5100
William Joy
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5101
Original author of \fIcsh\fR(1)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5102
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5103
J.E. Kulp, IIASA, Laxenburg, Austria
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5104
Job control and directory stack features
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5105
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5106
Ken Greer, HP Labs, 1981
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5107
File name completion
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5108
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5109
Mike Ellis, Fairchild, 1983
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5110
Command name recognition/completion
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5111
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5112
Paul Placeway, Ohio State CIS Dept., 1983-1993
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5113
Command line editor, prompt routines, new glob syntax and numerous fixes
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5114
and speedups
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5115
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5116
Karl Kleinpaste, CCI 1983-4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5117
Special aliases, directory stack extraction stuff, login/logout watch,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5118
scheduled events, and the idea of the new prompt format
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5119
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5120
Rayan Zachariassen, University of Toronto, 1984
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5121
\fIls\-F\fR and \fIwhich\fR builtins and numerous bug fixes, modifications
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5122
and speedups
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5123
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5124
Chris Kingsley, Caltech
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5125
Fast storage allocator routines
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5126
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5127
Chris Grevstad, TRW, 1987
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5128
Incorporated 4.3BSD \fIcsh\fR into \fItcsh\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5129
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5130
Christos S. Zoulas, Cornell U. EE Dept., 1987-94
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5131
Ports to HPUX, SVR2 and SVR3, a SysV version of getwd.c, SHORT_STRINGS support
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5132
and a new version of sh.glob.c
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5133
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5134
James J Dempsey, BBN, and Paul Placeway, OSU, 1988
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5135
A/UX port
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5136
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5137
Daniel Long, NNSC, 1988
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5138
\fBwordchars\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5139
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5140
Patrick Wolfe, Kuck and Associates, Inc., 1988
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5141
\fIvi\fR mode cleanup
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5142
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5143
David C Lawrence, Rensselaer Polytechnic Institute, 1989
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5144
\fBautolist\fR and ambiguous completion listing
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5145
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5146
Alec Wolman, DEC, 1989
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5147
Newlines in the prompt
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5148
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5149
Matt Landau, BBN, 1989
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5150
\fI~/.tcshrc\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5151
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5152
Ray Moody, Purdue Physics, 1989
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5153
Magic space bar history expansion
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5154
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5155
Mordechai ????, Intel, 1989
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5156
printprompt() fixes and additions
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5157
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5158
Kazuhiro Honda, Dept. of Computer Science, Keio University, 1989
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5159
Automatic spelling correction and \fBprompt3\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5160
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5161
Per Hedeland, Ellemtel, Sweden, 1990-
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5162
Various bugfixes, improvements and manual updates
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5163
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5164
Hans J. Albertsson (Sun Sweden)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5165
\fBampm\fR, \fIsettc\fR and \fItelltc\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5166
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5167
Michael Bloom
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5168
Interrupt handling fixes
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5169
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5170
Michael Fine, Digital Equipment Corp
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5171
Extended key support
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5172
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5173
Eric Schnoebelen, Convex, 1990
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5174
Convex support, lots of \fIcsh\fR bug fixes,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5175
save and restore of directory stack
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5176
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5177
Ron Flax, Apple, 1990
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5178
A/UX 2.0 (re)port
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5179
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5180
Dan Oscarsson, LTH Sweden, 1990
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5181
NLS support and simulated NLS support for non NLS sites, fixes
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5182
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5183
Johan Widen, SICS Sweden, 1990
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5184
\fBshlvl\fR, Mach support, \fIcorrect-line\fR, 8-bit printing
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5185
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5186
Matt Day, Sanyo Icon, 1990
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5187
POSIX termio support, SysV limit fixes
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5188
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5189
Jaap Vermeulen, Sequent, 1990-91
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5190
Vi mode fixes, expand-line, window change fixes, Symmetry port
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5191
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5192
Martin Boyer, Institut de recherche d'Hydro-Quebec, 1991
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5193
\fBautolist\fR beeping options, modified the history search to search for
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5194
the whole string from the beginning of the line to the cursor.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5195
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5196
Scott Krotz, Motorola, 1991
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5197
Minix port
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5198
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5199
David Dawes, Sydney U. Australia, Physics Dept., 1991
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5200
SVR4 job control fixes
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5201
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5202
Jose Sousa, Interactive Systems Corp., 1991
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5203
Extended \fIvi\fR fixes and \fIvi\fR delete command
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5204
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5205
Marc Horowitz, MIT, 1991
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5206
ANSIfication fixes, new exec hashing code, imake fixes, \fIwhere\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5207
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5208
Bruce Sterling Woodcock, [email protected], 1991-1995
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5209
ETA and Pyramid port, Makefile and lint fixes, \fBignoreeof\fR=n addition, and
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5210
various other portability changes and bug fixes
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5211
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5212
Jeff Fink, 1992
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5213
\fIcomplete-word-fwd\fR and \fIcomplete-word-back\fR
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5214
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5215
Harry C. Pulley, 1992
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5216
Coherent port
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5217
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5218
Andy Phillips, Mullard Space Science Lab U.K., 1992
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5219
VMS-POSIX port
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5220
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5221
Beto Appleton, IBM Corp., 1992
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5222
Walking process group fixes, \fIcsh\fR bug fixes,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5223
POSIX file tests, POSIX SIGHUP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5224
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5225
Scott Bolte, Cray Computer Corp., 1992
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5226
CSOS port
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5227
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5228
Kaveh R. Ghazi, Rutgers University, 1992
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5229
Tek, m88k, Titan and Masscomp ports and fixes.  Added autoconf support.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5230
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5231
Mark Linderman, Cornell University, 1992
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5232
OS/2 port
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5233
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5234
Mika Liljeberg, [email protected], 1992
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5235
Linux port
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5236
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5237
Tim P. Starrin, NASA Langley Research Center Operations, 1993
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5238
Read-only variables
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5239
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5240
Dave Schweisguth, Yale University, 1993-4
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5241
New man page and tcsh.man2html
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5242
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5243
Larry Schwimmer, Stanford University, 1993
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5244
AFS and HESIOD patches
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5245
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5246
Luke Mewburn, RMIT University, 1994-6
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5247
Enhanced directory printing in prompt,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5248
added \fBellipsis\fR and \fBrprompt\fR.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5249
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5250
Edward Hutchins, Silicon Graphics Inc., 1996
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5251
Added implicit cd.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5252
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5253
Martin Kraemer, 1997
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5254
Ported to Siemens Nixdorf EBCDIC machine
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5255
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5256
Amol Deshpande, Microsoft, 1997
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5257
Ported to WIN32 (Windows/95 and Windows/NT); wrote all the missing library
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5258
and message catalog code to interface to Windows.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5259
.TP 2
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5260
Taga Nayuta, 1998
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5261
Color ls additions.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5262
.PD
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5263
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5264
.SH "THANKS TO"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5265
Bryan Dunlap, Clayton Elwell, Karl Kleinpaste, Bob Manson, Steve Romig,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5266
Diana Smetters, Bob Sutterfield, Mark Verber, Elizabeth Zwicky and all
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5267
the other people at Ohio State for suggestions and encouragement
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5268
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5269
All the people on the net, for putting up with,
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5270
reporting bugs in, and suggesting new additions to each and every version
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5271
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5272
Richard M. Alderson III, for writing the `T in tcsh' section
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5273
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5274
.SH ATTRIBUTES
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5275
See
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5276
.BR attributes (5)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5277
for descriptions of the following attributes:
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5278
.sp
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5279
.TS
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5280
box;
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5281
cbp-1 | cbp-1
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5282
l | l .
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5283
ATTRIBUTE TYPE	ATTRIBUTE VALUE
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5284
=
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5285
Availability	shell/tcsh
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5286
=
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5287
Interface Stability	Volatile
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5288
.TE 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5289
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5290
.SH "NOTES"
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5291
Source for tcsh is available on http://opensolaris.org.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5292
.PP
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5293
It is no longer possible for variables to have a '-' or a '=' within the
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5294
name. Any variables of this form will generate a 'setenv: Syntax error'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
  5295
error message.