From owner-man-jp-reviewer@jp.freebsd.org  Thu Oct 26 00:12:59 2000
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id AAA26700;
	Thu, 26 Oct 2000 00:12:59 +0900 (JST)
	(envelope-from owner-man-jp-reviewer@jp.FreeBSD.org)
Received: from surf.ap.seikei.ac.jp (root@surf.ap.seikei.ac.jp [133.220.91.111])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id AAA26695
	for <man-jp-reviewer@jp.freebsd.org>; Thu, 26 Oct 2000 00:12:58 +0900 (JST)
	(envelope-from nakano@surf.ap.seikei.ac.jp)
Received: from babarelay.ap.seikei.ac.jp (root@babarelay.ap.seikei.ac.jp [133.220.91.113])
	by surf.ap.seikei.ac.jp (8.9.3/3.7W-99/03/03) with ESMTP id AAA15512
	for <man-jp-reviewer@jp.freebsd.org>; Thu, 26 Oct 2000 00:13:14 +0900
Received: (from nakano@localhost)
	by babarelay.ap.seikei.ac.jp (8.9.3/3.7W-99/04/13) id AAA01041;
	Thu, 26 Oct 2000 00:13:13 +0900
Date: Thu, 26 Oct 2000 00:13:13 +0900
Message-Id: <200010251513.AAA01041@babarelay.ap.seikei.ac.jp>
From: NAKANO Takeo <nakano@apm.seikei.ac.jp>
To: man-jp-reviewer@jp.freebsd.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-2022-JP
X-Mailer: mnews [version 1.22] 1999-12/19(Sun)
Reply-To: man-jp-reviewer@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+000315
X-Sequence: man-jp-reviewer 3021
Subject: [man-jp-reviewer 3021] tcsh.1 P4
Errors-To: owner-man-jp-reviewer@jp.freebsd.org
Sender: owner-man-jp-reviewer@jp.freebsd.org
X-Originator: nakano@apm.seikei.ac.jp

$BCfLn!w@.l~Bg$G$9!#(B

$B!!6bMK!:@Z$N=qN`=q$-$NF(Hr$G$d$C$D$1$^$7$?!#(B

# $B$=$N=qN`$N$[$&$O$^$@$^$@$@$C$?$j(B...

$B!!(BJM $B$NN.57$J$N$G$9$,!"BP1~$9$k86J8$r(B .\"O $B7A<0$N(B
$B%3%a%s%H$G;D$7$F$"$j$^$9!#!!<+?.$N$J$$ItJ,$J$I$K$O(B
.\"nakano $B$G%3%a%s%H$r$D$1$F$"$j$^$9!#(B

-- 
$BCfLn!w@.l~Bg(B

============$B$3$3$+$i(B
.PP
.\"O \fIselect\fR is an optional glob-pattern.
.\"O If given, words from only \fIlist\fR that match \fIselect\fR are considered
.\"O and the \fBfignore\fR shell variable is ignored.
.\"O The last three types of completion may not have a \fIselect\fR
.\"O pattern, and \fBx\fR uses \fIselect\fR as an explanatory message when
.\"O the \fIlist-choices\fR editor command is used.
\fIselect\fR $B$O(B glob $B%Q%?!<%s$G$9(B ($B>JN,2DG=(B)$B!#(B
$B$3$l$r;XDj$9$k$H!"(B\fIlist\fR$B$K$"$kC18l$N$&$A(B
\fIselect\fR $B$K%^%C%A$9$k$b$N$@$1$,BP>]$H$J$j!"(B
$B%7%'%kJQ?t(B \fBfignore\fR $B$OL5;k$5$l$^$9!#(B
$B:G8e$N(B 3 $B$D$NJd407A<0$K$O(B
\fIselect\fR $B%Q%?!<%s$rM?$($k$3$H$O$G$-$^$;$s!#(B
$B$^$?(B \fBx\fR $B$O(B \fIlist-choices\fR $BJT=8%3%^%s%I$,MQ$$$i$l$?;~$K$O(B
\fIselect\fR $B$r@bL@%a%C%;!<%8$H$7$F07$$$^$9!#(B
.PP
.\"O \fIsuffix\fR is a single character to be appended to a successful
.\"O completion.  If null, no character is appended.  If omitted (in which
.\"O case the fourth delimiter can also be omitted), a slash is appended to
.\"O directories and a space to other words.
\fIsuffix\fR $B$OC10l$NJ8;z$G!"Jd40$,@.8y$9$k$H$=$N$"$H$KDI2C$5$l$^$9!#(B
$B6u$N>l9g$O2?$bDI2C$5$l$^$;$s!#>JN,$5$l$k$H(B
($B$3$N>l9g(B 4 $BHVL\$N%G%j%_%?$b>JN,$G$-$^$9(B)
$B%G%#%l%/%H%j$K$O%9%i%C%7%eJ8;z$,!"(B
$B$=$NB>$NJ8;z$K$O%9%Z!<%9J8;z$,DI2C$5$l$^$9!#(B
.PP
.\"O Now for some examples.  Some commands take only directories as arguments,
.\"O so there's no point completing plain files.
$B$G$O$$$/$D$+Nc$r<($7$^$9!#(B
$B%G%#%l%/%H%j$N$_$r0z?t$K$H$k$h$&$J%3%^%s%I$b$"$k$N$G!"(B
.\"nakano there's no point?
$BIaDL$N%U%!%$%k$rJd40$9$k$h$&$JNc$O=P$7$^$;$s!#(B
.IP "" 4
> complete cd 'p/1/d/'
.PP
.\"O completes only the first word following `cd' (`p/1') with a directory.
.\"O \fBp\fR-type completion can also be used to narrow down command completion:
`cd' $B$KB3$/:G=i$NC18l$N$_(B (`p/1') $B$r%G%#%l%/%H%j$GJd40$7$^$9!#(B
$B%3%^%s%IJd40$r9J$j$3$`$?$a$K(B \fBp\fR-$B7A<0$NJd40$r(B
.\"nakano ($B$$$C$7$g$K(B?)
$BMQ$$$k$3$H$b$G$-$^$9!#(B
.IP "" 4
> co[^D]
.br
complete compress
.br
> complete \-co* 'p/0/(compress)/'
.br
> co[^D]
.br
> compress
.PP
.\"O This completion completes commands (words in position 0, `p/0')
.\"O which begin with `co' (thus matching `co*') to `compress' (the only
.\"O word in the list).
.\"O The leading `\-' indicates that this completion is to be used with only
.\"O ambiguous commands.
$B$3$l$O(B `co' $B$G;O$^$k(B ($B$9$J$o$A(B `co*' $B$K%^%C%A$9$k(B)
$B%3%^%s%I(B ($B0LCV(B 0 $B$K$"$kC18l(B `p/0') $B$rJd40$7$F!"(B
`compress' ($B%j%9%H$K$"$kM#0l$NC18l(B) $B$rM?$($?$b$N$G$9!#(B
$B@hF,$K$"$k(B `\-' $B$O!"(B
$B$3$NJd40$,IT3NDj$J%3%^%s%I$K$N$_MQ$$$i$l$k$3$H$r0UL#$7$^$9!#(B
.IP "" 4
> complete find 'n/\-user/u/'
.PP
.\"O is an example of \fBn\fR-type completion.  Any word following `find' and
.\"O immediately following `\-user' is completed from the list of users.
$B$3$l$O(B \fBn\fR-$B7A<0$NJd40$NNc$G$9!#(B
`find' $B$N8e$G!"$+$D(B `\-user' $B$ND>8e$K$"$kC18l$r!"(B
$B%f!<%6!<$N%j%9%H$GJd40$7$^$9!#(B
.IP "" 4
> complete cc 'c/\-I/d/'
.PP
.\"O demonstrates \fBc\fR-type completion.  Any word following `cc' and beginning
.\"O with `\-I' is completed as a directory.  `\-I' is not taken as part of the
.\"O directory because we used lowercase \fBc\fR.
\fBc\fR-$B7A<0$NJd40$NNc$G$9!#(B `cc' $B$N8e$K$"$j!"(B
$B$+$D(B `\-I' $B$G$O$8$^$kC18l$r%G%#%l%/%H%j$GJd40$7$^$9!#(B
$B$3$3$G$O>.J8;z$N(B \fBc\fR $B$rMQ$$$F$$$k$N$G!"(B
`\-I' $B$O%G%#%l%/%H%j$N0lIt$H$O$_$J$5$l$^$;$s!#(B
.PP
.\"O Different \fIlist\fRs are useful with different commands.
$B%3%^%s%I$K1~$8$F!"JXMx$J(B \fIlist\fR $B$b0[$J$j$^$9!#(B
.IP "" 4
> complete alias 'p/1/a/'
.br
> complete man 'p/*/c/'
.br
> complete set 'p/1/s/'
.br
> complete true 'p/1/x:Truth has no options./'
.PP
.\"O These complete words following `alias' with aliases, `man' with commands,
.\"O and `set' with shell variables.
.\"O `true' doesn't have any options, so \fBx\fR does nothing when completion
.\"O is attempted and prints `Truth has no options.' when completion choices are listed.
$B$3$l$i$G$O!"(B
`alias' $B$KB3$/C18l$r%(%$%j%"%9$G!"(B
`man' $B$KB3$/C18l$r%3%^%s%I$G!"(B
`set' $B$KB3$/C18l$r%7%'%kJQ?t$GCV$-49$($F$$$^$9!#(B
`true' $B$O%*%W%7%g%s$r<h$i$J$$$N$G!"(B
$BJd40$,;n$_$i$l$?$H$-$K2?$b9T$o$:!"(B
$BJd40%j%9%H$NA*Br2hLL$K$O(B `Truth has no options.' $B$rI=<($9$k(B
\fBx\fR $B$r;XDj$7$F$$$^$9!#(B
.PP
.ig \" Changed in 6.05.04
The \fIman\fR example, and several other examples below, use
\fBp\fR-type completion, rather than \fBC\fR- or \fBn\fR-type, so that
`*' will match an empty word.
..
.\"O Note that the \fIman\fR example, and several other examples below, could
.\"O just as well have used 'c/*' or 'n/*' as 'p/*'.
\fIman\fR $B$NNc$d!"0J2<$K<($9$$$/$D$+$NNc$G$O!"(B
`p/*' $B$NBe$o$j$K(B `c/*' $B$d(B `n/*' $B$rMQ$$$k$3$H$b$G$-$^$9!#(B
.PP
.\"O Words can be completed from a variable evaluated at completion time,
$BC18l$NJd40$rJQ?t$G9T$&$3$H$b$G$-$^$9!#$3$l$i$NJQ?t$OJd40$N:]$KI>2A$5$l$^$9!#(B
.IP "" 4
> complete ftp 'p/1/$hostnames/'
.br
> set hostnames = (rtfm.mit.edu tesla.ee.cornell.edu)
.br
> ftp [^D]
.br
rtfm.mit.edu tesla.ee.cornell.edu
.br
> ftp [^C]
.br
> set hostnames = (rtfm.mit.edu tesla.ee.cornell.edu uunet.uu.net)
.br
> ftp [^D]
.br
rtfm.mit.edu tesla.ee.cornell.edu uunet.uu.net
.PP
.\"O or from a command run at completion time:
$B$^$?Jd40$N:]$K%3%^%s%I$r<B9T$7!"$=$3$+$iJd40$r9T$&$3$H$b$G$-$^$9!#(B
.IP "" 4
> complete kill 'p/*/`ps | awk \\{print\\ \\$1\\}`/'
.br
> kill \-9 [^D]
.br
23113 23377 23380 23406 23429 23529 23530 PID
.PP
.\"O Note that the \fIcomplete\fR command does not itself quote its arguments,
.\"O so the braces, space and `$' in `{print $1}' must be quoted explicitly.
\fIcomplete\fR $B%3%^%s%I<+?H$O!"$=$N0z?t$r%/%)!<%H$7$^$;$s!#(B
$B$7$?$,$C$F(B `{print $1}' $B$K$"$k3g8L!&%9%Z!<%9!&(B`$' $B$O(B
$BL@<(E*$K%/%)!<%H$7$J$1$l$P$J$j$^$;$s!#(B
.PP
.\"O One command can have multiple completions:
$B0l$D$N%3%^%s%I$KJ#?t$NJd40$r;XDj$9$k$3$H$b$G$-$^$9!#(B
.IP "" 4
> complete dbx 'p/2/(core)/' 'p/*/c/'
.PP
.\"O completes the second argument to `dbx' with the word `core' and all other
.\"O arguments with commands.  Note that the positional completion is specified
.\"O before the next-word completion.
.\"O Because completions are evaluated from left to right, if
.\"O the next-word completion were specified first it would always match
.\"O and the positional completion would never be executed.  This is a
.\"O common mistake when defining a completion.
$B$3$l$O(B `dbx' $B$NBh(B 2 $B0z?t$r(B `core' $B$H$$$&C18l$GJd40$7!"(B
$BB>$NA4$F$N0z?t$r%3%^%s%I$GJd40$7$^$9!#(B
$B0LCV;XDj%?%$%W$NJd40$O!"C`<!Jd40$h$jA0$K;XDj$9$k$3$H$KCm0U$7$F$/$@$5$$!#(B
.\"nakano positional completion & next-word completion $B$NLu8l$O!"$H$j$"$($:(B
.\"WORD:	positional completion	$B0LCV;XDjJd40(B
.\"WORD:	next-word completion	$BC`<!Jd40(B
.\"nakano $B$H$7$F$_$^$7$?!#(B
$BJd40$O:8$+$i1&$KI>2A$5$l$k$N$G!"(B
($B>o$K%^%C%A$9$k(B) $BC`<!Jd40$,@h$K;XDj$5$l$F$$$k$H!"(B
$B0LCV;XDjJd40$O7h$7$F9T$o$l$J$/$J$C$F$7$^$$$^$9!#(B
$B$3$l$OJd40Dj5A$N:]$K$h$/$d$k%_%9$J$N$GCm0U$7$F$/$@$5$$!#(B
.PP
.\"O The \fIselect\fR pattern is useful when a command takes files with only
.\"O particular forms as arguments.  For example,
\fIselect\fR $B%Q%?!<%s$O!"(B
$B%3%^%s%I$,FCDj$N7A<0$r;}$C$?%U%!%$%k$@$1$r0z?t$K$H$k$h$&$J>l9g$KJXMx$G$9!#(B
$B0J2<$KNc$r<($7$^$9!#(B
.IP "" 4
> complete cc 'p/*/f:*.[cao]/'
.PP
.\"O completes `cc' arguments to files ending in only `.c', `.a', or `.o'.
.\"O \fIselect\fR can also exclude files, using negation of a glob-pattern as
.\"O described under \fBFilename substitution\fR.  One might use
$B$3$l$O(B `cc' $B$N0z?t$r!"(B`.c', `.a', `.o' $B$G=*$o$k%U%!%$%k$@$1$+$iJd40$7$^$9!#(B
$B0J2<$N(B\fB$B%U%!%$%kL>CV49(B\fR$B$G=R$Y$k$h$&$J$d$jJ}$G(B
glob $B%Q%?!<%s$NH]Dj$r;XDj$9$l$P!"(B
\fIselect\fR $B$GFCDj$N%U%!%$%k$rGS=|$9$k$3$H$b$G$-$^$9!#(B
.IP "" 4
> complete rm 'p/*/f:^*.{c,h,cc,C,tex,1,man,l,y}/'
.PP
.\"O to exclude precious source code from `rm' completion.  Of course, one
.\"O could still type excluded names manually or override the completion
.\"O mechanism using the \fIcomplete-word-raw\fR or \fIlist-choices-raw\fR
.\"O editor commands (q.v.).
$B$3$l$OBg;v$J%=!<%9%3!<%I$r(B `rm' $B$NJd40$K8=$l$J$$$h$&$K$7$^$9!#(B
$B$b$A$m$s$3$NGS=|$5$l$?L>A0$r<j$GBG$C$?$j!"(B
\fIcomplete-word-raw\fR $B$d(B \fIlist-choices-raw\fR
$B$J$I$NJT=8%3%^%s%I$rMQ$$$FJd40$N;EAH$_$rJQ99$9$k$3$H$b$G$-$^$9(B
($B$=$l$>$l3:Ev$NItJ,$r;2>H$N$3$H(B)$B!#(B
.PP
.\"O The `C', `D', `F' and `T' \fIlist\fRs are like `c', `d', `f' and `t'
.\"O respectively, but they use the \fIselect\fR argument in a different way: to
.\"O restrict completion to files beginning with a particular path prefix.  For
.\"O example, the Elm mail program uses `=' as an abbreviation for one's mail
.\"O directory.  One might use
`C', `D', `F', `T' $B3F(B\fI$B%j%9%H(B\fR $B$O!"(B
$B$=$l$>$l(B `c', `d', `f', `t' $B$H;w$F$$$^$9$,!"(B
\fIselect\fR $B$N0z?t$N2r<a$N;EJ}$,0[$J$j!"(B
$BJd40BP>]$N%U%!%$%k$rA0CV%Q%9L>$,FCDj$N$b$N$K8B$j$^$9!#(B
$BNc$($P!"%a!<%k%W%m%0%i%`(B Elm $B$O(B `=' $B$r(B
$B%f!<%6$N%a!<%k%G%#%l%/%H%j$N>JN,L>$H$7$FMQ$$$^$9!#(B
$B$3$N>l9g(B `elm \-f =' $B$r(B `elm \-f ~/Mail/' $B$G$"$k$+$N$h$&$KJd40$9$k$K$O(B
.IP "" 4
> complete elm c@=@F:$HOME/Mail/@
.PP
.\"O to complete `elm \-f =' as if it were `elm \-f ~/Mail/'.  Note that we used `@'
.\"O instead of `/' to avoid confusion with the \fIselect\fR argument, and we used
.\"O `$HOME' instead of `~' because home directory substitution works at only the
.\"O beginning of a word.
$B$H$9$Y$-$G$9!#$3$3$G$O(B `/' $B$NBe$o$j$K(B `@' $B$rMQ$$!"(B
\fIselect\fR $B0z?t$r8+$d$9$/$7$F$$$^$9!#(B
$B$^$?%[!<%`%G%#%l%/%H%j$NBeF~$OC18l$N@hF,$G$N$_F0:n$9$k$N$G!"(B
`~' $B$NBe$o$j$K(B `$HOME' $B$rMQ$$$F$$$^$9!#(B
.PP
.\"O \fIsuffix\fR is used to add a nonstandard suffix
.\"O (not space or `/' for directories) to completed words.
\fIsuffix\fR $B$OI8=`$G$OMQ0U$5$l$F$$$J$$3HD%;R(B
($B%G%#%l%/%H%j$KBP$9$k%9%Z!<%9$d(B `/' $B0J30(B)
$B$rC18lJd40MQ$KDI2C$9$k$?$a$KMQ$$$^$9!#(B
.IP "" 4
> complete finger 'c/*@/$hostnames/' 'p/1/u/@'
.PP
.\"O completes arguments to `finger' from the list of users, appends an `@',
.\"O and then completes after the `@' from the `hostnames' variable.  Note
.\"O again the order in which the completions are specified.
$B$3$l$O(B `finger' $B$N0z?t$r!"$^$:%f!<%6$N%j%9%H$+$iJd40$7!"(B
$B$=$l$K(B `@' $B$rDI2C$7!"$5$i$K(B `@' $B$N8e$r(B `hostnames' $BJQ?t(B
.\"nakano $B%7%'%kJQ?t!)(B
$B$N%j%9%H$+$iJd40$7$^$9!#$3$3$G$bJd40;XDj$N=g=x$KCm0U$7$F$/$@$5$$!#(B
.PP
.\"O Finally, here's a complex example for inspiration:
$B:G8e$K!"<(:6$KIY$`J#;($JNc$r<($7$^$7$g$&!#(B
.IP "" 4
> complete find \\
.br
\'n/\-name/f/' 'n/\-newer/f/' 'n/\-{,n}cpio/f/' \e
.br
\'n/\-exec/c/' 'n/\-ok/c/' 'n/\-user/u/' \e
.br
\'n/\-group/g/' 'n/\-fstype/(nfs 4.2)/' \e
.br
\'n/\-type/(b c d f l p s)/' \e
.br
\'c/\-/(name newer cpio ncpio exec ok user \e
.br
group fstype type atime ctime depth inum \e
.br
ls mtime nogroup nouser perm print prune \e
.br
size xdev)/' \e
.br
\'p/*/d/'
.PP
.\"O This completes words following `\-name', `\-newer', `\-cpio' or `ncpio'
.\"O (note the pattern which matches both) to files,
.\"O words following `\-exec' or `\-ok' to commands, words following `user'
.\"O and `group' to users and groups respectively
.\"O and words following `\-fstype' or `\-type' to members of the
.\"O given lists.  It also completes the switches themselves from the given list
.\"O (note the use of \fBc\fR-type completion)
.\"O and completes anything not otherwise completed to a directory.  Whew.
$B$3$l$O(B `\-name', `\-newer', `\-cpio', `ncpio' $B$KB3$/C18l$r(B
$B%U%!%$%k$GJd40$7(B ($B:G8e$NN><T$K%^%C%A$9$k%Q%?!<%s$KCm0U(B)$B!"(B
`\-exec', `\-ok' $B$KB3$/C18l$r%3%^%s%I$GJd40$7!"(B
`user' $B$N8e$r%f!<%6L>$G!"(B `group' $B$N8e$r%0%k!<%WL>$GJd40$7!"(B
`\-fstype' $B$H(B `\-type' $B$N8e$r$=$l$>$l$KM?$($?%j%9%H$N%a%s%P!<$GJd40$7$^$9!#(B
$B$^$?(B find $B$KM?$($k%9%$%C%AC#$bM?$($?%j%9%H$+$iJd40$7(B
(\fBc\fR-$B7?$NJd40$rMQ$$$F$$$k$3$H$KCm0U(B)$B!"(B
$B$=$l0J30$N$b$NA4$F$r%G%#%l%/%H%j$GJd40$7$^$9!#$U$%!#(B
.PP
.\"O Remember that programmed completions are ignored if the word being completed
.\"O is a tilde substitution (beginning with `~') or a variable (beginning with `$').
.\"O \fIcomplete\fR is an experimental feature, and the syntax may change
.\"O in future versions of the shell.
.\"O See also the \fIuncomplete\fR builtin command.
$BJd40;XDj$O!"BP>]$H$J$kC18l$,%A%k%@BeF~(B (`~' $B$G$O$8$^$k(B) $B$d(B
$BJQ?t(B (`$' $B$G$O$8$^$k(B) $B$N>l9g$OL5;k$5$l$k$3$H$KN10U$7$F$/$@$5$$!#(B
.\"WORD:	programmed completion	$BJd40;XDj(B
.\"WORD:	tilde substitution	$B%A%k%@BeF~(B ($B$&!<$s(B...)
\fIcomplete\fR $B$O<B83E*$J5!G=$G$"$j!"(B
$BJ8K!$O$3$N%7%'%k$N>-Mh$N%P!<%8%g%s$G$OJQ99$5$l$k$+$b$7$l$^$;$s!#(B
$BAH$_9~$_%3%^%s%I(B \fIuncomplete\fR $B$N@bL@$b8+$F$/$@$5$$!#(B
.RE
.TP 8
.B continue
.\"O Continues execution of the nearest enclosing \fIwhile\fR or \fIforeach\fR.
.\"O The rest of the commands on the current line are executed.
$B$b$C$H$b6a$$(B \fIwhile\fR $B$^$?$O(B \fIforeach\fR $B%k!<%W$N<B9T$r7QB3$7$^$9!#(B
$B8=:_$N9T$K$"$k;D$j$N%3%^%s%I$O<B9T$5$l$^$9!#(B
.TP 8
.B default:
.\"O Labels the default case in a \fIswitch\fR statement.
.\"O It should come after all \fIcase\fR labels.
\fIswitch\fR $BJ8$N%G%U%)%k%H$N>l9g$N%i%Y%k$G$9!#(B
$B$3$l$OA4$F$N(B \fIcase\fR $B%i%Y%k$N8e$KCV$/$Y$-$G$9!#(B
.PP
.B dirs \fR[\fB\-l\fR] [\fB\-n\fR|\fB\-v\fR]
.br
.B dirs \-S\fR|\fB\-L \fR[\fIfilename\fR] (+)
.PD 0
.TP 8
.B dirs \-c \fR(+)
.\"O The first form prints the directory stack.  The top of the stack is at the
.\"O left and the first directory in the stack is the current directory.
.\"O With \fB\-l\fR, `~' or `~\fIname\fP' in the output is expanded explicitly
.\"O to \fBhome\fR or the pathname of the home directory for user \fIname\fP.  (+)
.\"O With \fB\-n\fR, entries are wrapped before they reach the edge of the screen.  (+)
.\"O With \fB\-v\fR, entries are printed one per line, preceded by their stack positions.  (+)
.\"O If more than one of \fB\-n\fR or \fB\-v\fR is given, \fB\-v\fR takes precedence.
.\"O \fB\-p\fR is accepted but does nothing.
$B:G=i$N7A<0$O%G%#%l%/%H%j%9%?%C%/$rI=<($7$^$9!#(B
$B%9%?%C%/$N>e$,:8$KMh$F!"(B
$B%9%?%C%/@hF,$N%G%#%l%/%H%j$O8=:_$N%G%#%l%/%H%j$K$J$j$^$9!#(B
\fB\-l\fR $B$r;XDj$9$k$H!"=PNO$N(B `~' $B$d(B `~\fIname\fP' $B$O!"(B
\fBhome\fR $B$d!"%f!<%6(B \fIname\fP $B$N%[!<%`%G%#%l%/%H%j$N%Q%9L>$K(B
$BL@<(E*$KE83+$5$l$^$9!#(B (+)
\fB\-n\fR $B$r;XDj$9$k$H!"%(%s%H%j$O%9%/%j!<%s$N=*C<$KC#$9$kA0$K(B
$B7e@^$j$5$l$^$9!#(B (+)
\fB\-v\fR $B$r;XDj$9$k$H!"3F%(%s%H%j$,0l9T$K$R$H$D$:$DI=<($5$l!"(B
$B%9%?%C%/FbIt$G$N0LCV$,%(%s%H%j$NA0$KI=<($5$l$^$9!#(B (+)
\fB\-n\fR $B$d(B \fB\-v\fR $B$,$R$H$D0J>e;XDj$5$l$k$H(B \fB\-v\fR $B$,M%@h$5$l$^$9!#(B
.PD
.RS +8
.PP
.\"O With \fB\-S\fR, the second form saves the directory stack to \fIfilename\fR
.\"O as a series of \fIcd\fR and \fIpushd\fR commands.
.\"O With \fB\-L\fR, the shell sources \fIfilename\fR, which is presumably
.\"O a directory stack file saved by the \fB\-S\fR option or the \fBsavedirs\fR
.\"O mechanism.
.\"O In either case, \fBdirsfile\fR is used if \fIfilename\fR is not given and
.\"O \fI~/.cshdirs\fR is used if \fBdirsfile\fR is unset.
\fB\-S\fR $B$r;XDj$7$?FsHVL\$N7A<0$G$O!"(B
$B%G%#%l%/%H%j%9%?%C%/$r(B
\fIcd\fR $B$H(B \fIpushd\fR $B$+$i$J$k%3%^%s%INs$H$7$F(B
\fIfilename\fR $B$KJ]B8$7$^$9!#(B
\fB\-L\fR $B$r;XDj$9$k$H!"$3$N%7%'%k$O(B \fIfilename\fR $B$r(B source $B$7$^$9!#(B
.\"nakano $BF0;l$N(B source $B$O(B...
$B$3$N%U%!%$%k$O!"0JA0$K(B \fB\-S\fR $B%*%W%7%g%s$d(B
\fBsavedirs\fR $B5!9=$GJ]B8$5$l$?%G%#%l%/%H%j%9%?%C%/$G$9!#(B
$B$$$:$l$N>l9g$G$b!"(B \fIfilename\fR $B$,M?$($i$l$J$1$l$P(B
\fBdirsfile\fR $B$rMQ$$$^$9!#(B
\fBdirsfile\fR $B$b;XDj$5$l$F$$$J$1$l$P(B \fI~/.cshdirs\fR $B$rMQ$$$^$9!#(B
.PP
.\"O Note that login shells do the equivalent of `dirs \-L' on startup
.\"O and, if \fBsavedirs\fR is set, `dirs \-S' before exiting.
.\"O Because only \fI~/.tcshrc\fR is normally sourced before \fI~/.cshdirs\fR,
.\"O \fBdirsfile\fR should be set in \fI~/.tcshrc\fR rather than \fI~/.login\fR.
$B%m%0%$%s%7%'%k$O(B `dirs \-L' $B$HF1MM$N$3$H$r5/F0;~$K9T$C$F$*$j!"(B
$B$^$?(B \fBsavedirs\fR $B$,@_Dj$5$l$F$$$l$P=*N;A0$K(B
`dirs \-S' $B$HF1MM$N$3$H$r9T$$$^$9!#(B
$BDL>o(B \fI~/.tcshrc\fR $B$@$1$,(B \fI~/.cshdirs\fR $B$NA0$K(B source $B$5$l$k$N$G!"(B
\fBdirsfile\fR $B$O(B \fI~/.login\fR $B$G$O$J$/(B
\fI~/.tcshrc\fR $B$G@_Dj$9$Y$-$G$9!#(B
.\"nakano $B0UL#<h$l$F$$$^$;$s!#(B
.PP
.\"O The last form clears the directory stack.
$B:G8e$N7A<0$O%G%#%l%/%H%j%9%?%C%/$r%/%j%"$7$^$9!#(B
.RE
.TP 8
.B echo \fR[\fB\-n\fR] \fIword\fR ...
.\"O Writes each \fIword\fR to the shell's standard
.\"O output, separated by spaces and terminated with a newline.
.\"O The \fBecho_style\fR shell variable may be set to emulate (or not) the flags and escape
.\"O sequences of the BSD and/or System V versions of \fIecho\fR; see \fIecho\fR(1).
$B3F(B \fIword\fR $B$r%9%Z!<%9$G6h@Z$j!"2~9T$G=*C<$5$;$F(B
$B%7%'%k$NI8=`=PNO$K=q$-=P$7$^$9!#(B
$B%7%'%kJQ?t(B \fBecho_style\fR $B$r;XDj$9$k$H!"(B
BSD $B$d(B System V $B$N(B \fIecho\fR $B$N%U%i%0$d%(%9%1!<%W%7!<%1%s%9$r(B
$B%(%_%e%l!<%H$9$k(B ($B$7$J$$(B) $B$h$&$K$G$-$^$9!#(B
$B>\:Y$O(B \fIecho\fR(1) $B$r8+$F$/$@$5$$!#(B
.TP 8
.B echotc \fR[\fB\-sv\fR] \fIarg\fR ... (+)
.\"O Exercises the terminal capabilities (see \fItermcap\fR(5)) in \fIargs\fR.
.\"O For example, 'echotc home' sends the cursor to the home position,
.\"O \&'echotc cm 3 10' sends it to column 3 and row 10, and
.\"O \&'echotc ts 0; echo "This is a test."; echotc fs' prints "This is a test."
.\"O in the status line.
\fIarg\fR $B$GM?$($i$l$?C<Kv$N5!G=(B (\fItermcap\fR(5) $B$r;2>H(B) $B$r<B9T$7$^$9!#(B
$BNc$($P(B `echotc home' $B$O%+!<%=%k$r%[!<%`%]%8%7%g%s$K0\F0$7!"(B
`echotc cm 3 10' $B$O%+!<%=%k$r(B 3 $BNs(B 10 $B9T$K0\F0$7!"(B
`echotc ts 0; echo "This is a test."; echotc fs' $B$O(B
"This is a test." $B$r%9%F!<%?%99T$KI=<($7$^$9!#(B
.RS +8
.PP
.\"O If \fIarg\fR is 'baud', 'cols', 'lines', 'meta' or 'tabs', prints the
.\"O value of that capability ("yes" or "no" indicating that the terminal does
.\"O or does not have that capability).  One might use this to make the output
.\"O from a shell script less verbose on slow terminals, or limit command
.\"O output to the number of lines on the screen:
\fIarg\fR $B$,(B `baud', `cols', `lines', `meta', `tabs' $B$N$$$:$l$+$G$"$C$?>l9g$O!"(B
$B$=$N5!G=$NCM$rI=<($7$^$9(B ("yes" $B$^$?$O(B "no" $B$O!"(B
$BC<Kv$,$=$N5!G=$r;}$C$F$$$k$+$$$J$$$+$r<($7$^$9(B)$B!#(B
$BCY$$C<Kv$G%7%'%k%9%/%j%W%H$N=PNO$r$h$j2IL[$K$7$?$j!"(B
$B%3%^%s%I$N=PNO$r%9%/%j!<%s$N9T?t$K@)8B$7$?$j$9$k$h$&$J>l9g$K$O!"(B
$B0J2<$N%3%^%s%I$r;H$&$HNI$$$G$7$g$&!#(B
.IP "" 4
> set history=`echotc lines`
.br
> @ history\-\-
.PP
.\"O Termcap strings may contain wildcards which will not echo correctly.
.\"O One should use double quotes when setting a shell variable to a terminal
.\"O capability string, as in the following example that places the date in
.\"O the status line:
termcap $BJ8;zNs$O%o%$%k%I%+!<%I$r4^$`$3$H$,$G$-$^$9$,!"(B
$B$3$l$O@5$7$/(B echo $B$5$l$^$;$s!#(B
$B%7%'%kJQ?t$KC<Kv5!G=J8;zNs$r@_Dj$9$k$H$-$K$O!"(B
$B0J2<$NNc$N$h$&$K%@%V%k%/%)!<%H$rMQ$$$F$/$@$5$$!#(B
$B$3$NNc$G$OF|IU$r%9%F!<%?%99T$KI=<($7$F$$$^$9!#(B
.IP "" 4
> set tosl="`echotc ts 0`"
.br
> set frsl="`echotc fs`"
.br
> echo \-n "$tosl";date; echo \-n "$frsl"
.PP
.\"O With \fB\-s\fR, nonexistent capabilities return the empty string rather
.\"O than causing an error.
.\"O With \fB\-v\fR, messages are verbose.
\fB\-s\fR $B$r;XDj$9$k$H!"B8:_$7$J$$5!G=$r;XDj$7$?$H$-!"(B
$B%(%i!<$r$*$3$5$:$K6uJ8;zNs$rJV$7$^$9!#(B
.RE
.PP
.B else
.br
.B end
.br
.B endif
.PD 0
.TP 8
.B endsw
.\"O See the description of the \fIforeach\fR, \fIif\fR, \fIswitch\fR, and
.\"O \fIwhile\fR statements below.
$B0J2<$N(B \fIforeach\fR, \fIif\fR, \fIswitch\fR,
\fIwhile\fI $BJ8$N@bL@$r8+$F$/$@$5$$!#(B
.PD
.TP 8
.B eval \fIarg\fR ...
.\"O Treats the arguments as input to the
.\"O shell and executes the resulting command(s) in the context
.\"O of the current shell.  This is usually used to execute commands
.\"O generated as the result of command or variable substitution,
.\"O because parsing occurs before these substitutions.
.\"O See \fItset\fR(1) for a sample use of \fIeval\fR.
$B0z?t$r%7%'%k$X$NF~NO$H$7$F07$$!"(B
$B;D$j$N%3%^%s%I$r8=:_$N%7%'%k$N%3%s%F%-%9%H$G<B9T$7$^$9!#(B
$B$3$l$ODL>o!"%3%^%s%I<B9T$dJQ?tBeF~$N7k2L$H$7$F(B
$B@8@.$5$l$?%3%^%s%I$r<B9T$9$k$N$KMQ$$$i$l$^$9(B
($B%Q!<%:$O$3$l$i$NBeF~$NA0$K9T$o$l$k$+$i$G$9(B)$B!#(B
.\"nakano $B0UL#<h$l$F$$$^$;$s!#(B
\fIeval\fR $B$NMxMQNc$O(B \fItset\fR(1) $B$r8+$F$/$@$5$$!#(B
.TP 8
.B exec \fIcommand\fR
.\"O Executes the specified command in place of the current shell.
$B;XDj$7$?%3%^%s%I$r8=:_$N%7%'%k$NBe$o$j$K<B9T$7$^$9!#(B
.TP 8
.B exit \fR[\fIexpr\fR]
.\"O The shell exits either with the value of the specified \fIexpr\fR
.\"O (an expression, as described under \fBExpressions\fR)
.\"O or, without \fIexpr\fR, with the value of the \fBstatus\fR variable.
$B;XDj$7$?(B \fIexpr\fR (\fB$B<0(B\fR $B$G2r@b$7$?<0(B) $B$NCM$G(B
(\fIexpr\fR $B$,;XDj$5$l$F$$$J$1$l$P(B \fBstatus\fR $BJQ?t$NCM$G(B)
$B%7%'%k$r=*N;$7$^$9!#(B
.TP 8
.B fg \fR[\fB%\fIjob\fR ...]
.\"O Brings the specified jobs (or, without arguments, the current job)
.\"O into the foreground, continuing each if it is stopped.
.\"O \fIjob\fR may be a number, a string, `', `%', `+' or `\-' as described
.\"O under \fBJobs\fR.
.\"O See also the \fIrun-fg-editor\fR editor command.
$B;XDj$7$?%8%g%V(B ($B$"$k$$$O0z?t$,$J$1$l$P8=:_$N%8%g%V(B)
$B$r%U%)%"%0%i%&%s%I$K0\F0$7$^$9!#Dd;_>uBV$K$"$k$b$N$O:F3+$7$^$9!#(B
\fIjob\fR $B$K$O(B\fB$B%8%g%V(B\fR $B$G2r@b$5$l$F$$$k$h$&$K!"(B
$B?tCM(B, $BJ8;zNs(B, `', `%', `+', `\-' $B$N$I$l$+$r;XDj$G$-$^$9!#(B
\fIrun-fg-editor\fI $BJT=8%3%^%s%I$b8+$F$/$@$5$$!#(B
.TP 8
.B filetest \-\fIop file\fR ... (+)
.\"O Applies \fIop\fR (which is a file inquiry operator as described under
.\"O \fBFile inquiry operators\fR) to each \fIfile\fR and returns the results as a
.\"O space-separated list.
(\fB$B%U%!%$%kLd9g$o$;1i;;;R(B\fR $B$G2r@b$5$l$F$$$k(B)
$B%U%!%$%kLd9g$o$;1i;;;R(B \fIop\fR $B$r3F(B \fIfile\fR $B$KE,MQ$7!"(B
$B7k2L$r%9%Z!<%96h@Z$j$N%j%9%H$GJV$7$^$9!#(B
.PP
.B foreach \fIname \fB(\fIwordlist\fB)
.br
\&...
.PD 0
.TP 8
.B end
.\"O Successively sets the variable \fIname\fR to each member of
.\"O \fIwordlist\fR and executes the sequence of commands between this command
.\"O and the matching \fIend\fR.  (Both \fIforeach\fR and \fIend\fR
.\"O must appear alone on separate lines.)  The builtin command
.\"O \fIcontinue\fR may be used to continue the loop prematurely and
.\"O the builtin command \fIbreak\fR to terminate it prematurely.
.\"O When this command is read from the terminal, the loop is read once
.\"O prompting with `foreach? ' (or \fBprompt2\fR) before any statements in
.\"O the loop are executed.  If you make a mistake typing in a
.\"O loop at the terminal you can rub it out.
\fIwordlist\fR $B$N%a%s%P!<$r(B \fIname\fR $B$K=g!9$KBeF~$7!"(B
$B$3$l$HBP1~$9$k(B \fIend\fR $B$K64$^$l$?HO0O$N(B
$B%3%^%s%I%7!<%1%s%9$r<B9T$7$^$9!#(B
(\fIforeach\fR $B$H(B \fIend\fR $B$O(B 1 $B9T$KC1FH$G8=$l$J$1$l$P$J$j$^$;$s!#(B)
$BAH$_9~$_%3%^%s%I(B \fIcontinue\fR $B$rMQ$$$k$H(B
$B%k!<%W$rESCf$G7QB3$9$k$3$H$,$G$-!"(B 
$BAH$_9~$_%3%^%s%I(B \fIbreak\fR $B$rMQ$$$k$H(B
$B%k!<%W$rESCf$G=*N;$5$;$k$3$H$,$G$-$^$9!#(B
$B$3$N%3%^%s%I$,C<Kv$+$iFI$_9~$^$l$k$H!"(B
$B0lEY%k!<%W$r(B `foreach?' $B%W%m%s%W%H(B ($B$"$k$$$O(B \fBprompt2\fR)
$B$GFI$_9~$_!"A4BN$rFI$_=*$($F$+$i%k!<%W$N3FJ8$r<B9T$7$^$9!#(B
$BC<Kv$+$i$NF~NO;~$K%k!<%W$NESCf$G%?%$%W%_%9$r$7$?>l9g$O!"(B
$B%k!<%W$r$J$+$C$?$3$H$K$G$-$^$9!#(B
.\"nakano rub out $B$NLu8l$,$A$g$C$H%T%s$HMh$^$;$s!#(B
.PD
.TP 8
.B getspath \fR(+)
.\"O Prints the system execution path.  (TCF only)
$B%7%9%F%`$N<B9T%Q%9$rI=<($7$^$9!#(B (TCF $B$N$_(B)
.TP 8
.B getxvers \fR(+)
.\"O Prints the experimental version prefix.  (TCF only)
$B<B83E*%P!<%8%g%s$N%W%l%U%#%C%/%9$rI=<($7$^$9!#(B (TCF $B$N$_(B)
.\"nakano ....
.TP 8
.B glob \fIwordlist
.\"O Like \fIecho\fR, but no `\\' escapes are recognized and words are
.\"O delimited by null characters in the output.  Useful for
.\"O programs which wish to use the shell to filename expand a list of words.
\fIecho\fR $B$H;w$F$$$^$9$,!"(B`\\' $B$G$N%(%9%1!<%W$rG'<1$;$:!"(B
$B$^$?=PNO$G$NC18l6h@Z$j$r%L%kJ8;z$K$7$^$9!#(B
$BC18l%j%9%H$r%U%!%$%kL>$KE83+$9$k$?$a$K(B
$B%W%m%0%i%`$+$i%7%'%k$rMxMQ$7$?$$$h$&$J>l9g$KJXMx$G$9!#(B
.TP 8
.B goto \fIword
.\"O \fIword\fR is filename and command-substituted to
.\"O yield a string of the form `label'.  The shell rewinds its
.\"O input as much as possible, searches for a line of the
.\"O form `label:', possibly preceded by blanks or tabs, and
.\"O continues execution after that line.
\fIword\fR $B$O%U%!%$%kL>$H(B `label' $B7A<0$NJ8;zNs$r=PNO$9$k%3%^%s%ICV49$G$9!#(B
.\"nakano ?
$B%7%'%k$OF~NO$r2DG=$J8B$j4,$-La$7!"(B
`label:' $B7A<0$N9T(B ($B6uGr$d%?%V$,A0CV$5$l$F$$$F$bNI$$(B) $B$r8!:w$7!"(B
$B$=$N9T$N<!$+$i<B9T$r7QB3$7$^$9!#(B
.TP 8
.B hashstat
.\"O Prints a statistics line indicating how effective the
.\"O internal hash table has been at locating commands (and avoiding
.\"O \fIexec\fR's).  An \fIexec\fR is attempted for each component of the
.\"O \fBpath\fR where the hash function indicates a possible hit, and
.\"O in each component which does not begin with a `/'.
$BFbIt$N%O%C%7%e%F!<%V%k$,!"(B
$B$3$l$^$G$N%3%^%s%IC5:w$K$I$NDxEY8zN(E*$G$"$C$?$+(B
($B$=$7$F(B \fIexec\fR $BN`$r;H$o$:$K:Q$s$@$+(B) $B$r<($9E}7W9T$rI=<($7$^$9!#(B
\fBpath\fR $B$N3F@.J,$N$&$A!"(B
$B%O%C%7%e4X?t$,%R%C%H$N2DG=@-$,$"$k$H$7$?$b$N$d!"(B
`/' $B$G;O$^$i$J$$$b$N$KBP$7$F(B \fIexec\fR $B$,(B $B;n$_$i$l$^$9!#(B
.IP
.\"O On machines without \fIvfork\fR(2), prints only the number and size of
.\"O hash buckets.
\fIvfork\fR(2) $B$N$J$$%^%7%s$G$O!"(B
$BC1$K%O%C%7%e%P%1%D$N%5%$%:$rI=<($7$^$9!#(B
.PP
.B history \fR[\fB\-hTr\fR] [\fIn\fR]
.br
.B history \-S\fR|\fB\-L|\fB\-M \fR[\fIfilename\fR] (+)
.PD 0
.TP 8
.B history \-c \fR(+)
.\"O The first form prints the history event list.
.\"O If \fIn\fR is given only the \fIn\fR most recent events are printed or saved.
.\"O With \fB\-h\fR, the history list is printed without leading numbers.  If
.\"O \fB-T\fR is specified, timestamps are printed also in comment form.
.\"O (This can be used to
.\"O produce files suitable for loading with 'history \-L' or 'source \-h'.)
.\"O With \fB\-r\fR, the order of printing is most recent
.\"O first rather than oldest first.
$B:G=i$N7A<0$O%$%Y%s%H%j%9%H$NMzNr$rI=<($7$^$9!#(B
\fIn\fR $B$rM?$($k$H!"?7$7$$J}:GBg(B \fIn\fR $B8D$N%$%Y%s%H$r(B
$BI=<($^$?$OJ]B8$7$^$9!#(B
\fB\-h\fR $B$r;XDj$9$k$H!"9TF,$N?t;zH4$-$G%j%9%H$rI=<($7$^$9!#(B
\fB\-T\fR $B$r;XDj$9$k$H!"%?%$%`%9%?%s%W$b%3%a%s%H$N$+$?$A$GI=<($5$l$^$9!#(B
($B$3$l$rMQ$$$k$H!"(B
`history \-L' $B$d(B `source \-h' $B$G$N%m!<%I$KE,$7$?%U%!%$%k$,:n@.$G$-$^$9!#(B)
\fB\-r\fR $B$r;XDj$9$k$H!"(B
$BI=<($N=gHV$,%G%U%)%k%H$N8E$$=g$G$O$J$/?7$7$$=g$K$J$j$^$9!#(B
.PD
.RS +8
.PP
.\"O With \fB\-S\fR, the second form saves the history list to \fIfilename\fR.
.\"O If the first word of the \fBsavehist\fR shell variable is set to a
.\"O number, at most that many lines are saved.  If the second word of
.\"O \fBsavehist\fR is set to `merge', the history list is merged with the
.\"O existing history file instead of replacing it (if there is one) and
.\"O sorted by time stamp.  (+) Merging is intended for an environment like
.\"O the X Window System
.\"O with several shells in simultaneous use.  Currently it succeeds
.\"O only when the shells quit nicely one after another.
$BFsHVL\$N7A<0$G(B \fB\-S\fR $B$r;XDj$9$k$H!"MzNr%j%9%H$r(B \fIfilename\fR
$B$KJ]B8$7$^$9!#%7%'%kJQ?t(B \fBsavehist\fR $B$N:G=i$NC18l$,(B
$B?tCM$K@_Dj$5$l$F$$$k$H!":GBg$G$=$N?tCM$^$G$N9T?t$,J]B8$5$l$^$9!#(B
\fBsavehist\fR $B$NFsHVL\$NC18l$,(B `merge' $B$@$C$?>l9g$K$O!"(B
$BMzNr%j%9%H$,8=B8$NMzNr%U%!%$%k$K%^!<%8$5$l!"%?%$%`%9%?%s%W=g$K%=!<%H$5$l$^$9(B
($B%G%U%)%k%H$G$O8=B8$N%U%!%$%k$rCV$-49$($^$9(B)$B!#(B (+)
$B%^!<%8$O(B X Window System $B$N$h$&$K!"(B
$BJ#?t$N%7%'%k$rF1;~$KMQ$$$k$h$&$J>l9g8~$1$N$b$N$G$9!#(B
$B8=:_$O!"%7%'%k$,9T57NI$/=g!9$K=*N;$9$k$h$&$J>l9g$G$J$$$H!"(B
$B%^!<%8$O@.8y$7$^$;$s!#(B
.PP
.\"O With \fB\-L\fR, the shell appends \fIfilename\fR, which is presumably a
.\"O history list saved by the \fB\-S\fR option or the \fBsavehist\fR mechanism,
.\"O to the history list.
.\"O \fB\-M\fR is like \fB\-L\fR, but the contents of \fIfilename\fR are merged
.\"O into the history list and sorted by timestamp.
.\"O In either case, \fBhistfile\fR is used if \fIfilename\fR is not given and
.\"O \fI~/.history\fR is used if \fBhistfile\fR is unset.
.\"O `history \-L' is exactly like 'source \-h' except that it does not require a
.\"O filename.
\fB\-L\fR $B$r;XDj$9$k$H!"%7%'%k$O(B \fIfilename\fR $B$r(B
$BMzNr%j%9%H$KDI2C$7$^$9!#(B\fIfilename\fR $B$O0JA0$K(B \fB\-S\fR $B%*%W%7%g%s$d(B
\fBsavehist\fR $B5!9=$GJ]B8$5$l$?MzNr%j%9%H%U%!%$%k$G$9!#(B
\fB\-M\fR $B$O(B \fB\-L\fR $B$H;w$F$$$^$9$,!"(B
\fIfilename\fR $B$NFbMF$OMzNr%j%9%H$K%^!<%8$5$l!"(B
$B%?%$%`%9%?%s%W$N=g$K%=!<%H$5$l$^$9!#(B
$B$$$:$l$N>l9g$G$b!"(B\fIfilename\fR $B$,M?$($i$l$J$1$l$P(B
\fBhistfile\fR $B$rMQ$$!"(B
\fBhistfile\fR $B$b@_Dj$5$l$F$$$J$1$l$P(B \fI~/.history\fR $B$rMQ$$$^$9!#(B
`history \-L' $B$O$[$H$s$I(B `source \-h' $B$HF1$8$G$9$,!"(B
$BA0<T$G$O%U%!%$%kL>$r>JN,$G$-$^$9!#(B
.PP
.\"O Note that login shells do the equivalent of `history \-L' on startup
.\"O and, if \fBsavehist\fR is set, `history \-S' before exiting.
.\"O Because only \fI~/.tcshrc\fR is normally sourced before \fI~/.history\fR,
.\"O \fBhistfile\fR should be set in \fI~/.tcshrc\fR rather than \fI~/.login\fR.
$B%m%0%$%s%7%'%k$O(B `history \-L' $B$HF1MM$N$3$H$r5/F0;~$K9T$C$F$*$j!"(B
$B$^$?(B \fBsavehist\fR $B$,@_Dj$5$l$F$$$l$P=*N;A0$K(B
`history \-S' $B$HF1MM$N$3$H$r9T$$$^$9!#(B
$BDL>o(B \fI~/.tcshrc\fR $B$@$1$,(B \fI~/.history\fR $B$NA0$K(B source $B$5$l$k$N$G!"(B
\fBhistfile\fR $B$O(B \fI~/.login\fR $B$G$O$J$/(B
\fI~/.tcshrc\fR $B$G@_Dj$9$Y$-$G$9!#(B
.\"nakano $B0UL#<h$l$F$$$^$;$s!#(B
.PP
.\"O If \fBhistlit\fR is set, the first and second forms print and save the literal
.\"O (unexpanded) form of the history list.
\fBhistlit\fR $B$,@_Dj$5$l$F$$$k$H!"(B
$B:G=i$N7A<0$HFsHVL\$N7A<0$OMzNr%j%9%H$r(B
$BJ8;zDL$j$N(B ($BE83+$5$l$J$$(B) $B$+$?$A$GI=<(!&J]B8$7$^$9!#(B
.PP
.\"O The last form clears the history list.
$B:G8e$N7A<0$OMzNr%j%9%H$r%/%j%"$7$^$9!#(B
.RE
.TP 8
.B hup \fR[\fIcommand\fR] \fR(+)
.\"O With \fIcommand\fR, runs \fIcommand\fR such that it will exit on a hangup
.\"O signal and arranges for the shell to send it a hangup signal when the shell
.\"O exits.
.\"O Note that commands may set their own response to hangups, overriding \fIhup\fR.
.\"O Without an argument (allowed in only a shell script), causes the shell to
.\"O exit on a hangup for the remainder of the script.
.\"O See also \fBSignal handling\fR and the \fInohup\fR builtin command.
\fIcommand\fR $B$r;XDj$9$k$H!"(B
hangup $B%7%0%J%k$,Aw$i$l$?$H$-$K=*N;$9$k$h$&$K$7$F(B
\fIcommand\fR $B$r<B9T$7!"(B
$B%7%'%k$,=*N;$9$k$H$-$K$=$N%3%^%s%I$K(B hangup $B%7%0%J%k$rAw$k$h$&$K$7$^$9!#(B
$B%3%^%s%I$K$h$C$F$O(B hangup $B$KBP$9$k$=$l$>$lFH<+$NH?1~$r@_Dj$9$k$3$H$,$"$j!"(B
$B$3$l$O(B \fIhup\fR $B$h$jM%@h$5$l$k$+$b$7$l$^$;$s!#(B
$B0z?t$r@_Dj$7$J$$$H(B ($B%7%'%k%9%/%j%W%HFbIt$N$_$G5v$5$l$^$9(B)$B!"(B
$B$=$N%7%'%k$O;D$j$N%9%/%j%W%H$NESCf$G(B
hangup $B%7%0%J%k$r<u$1<h$k$H=*N;$9$k$h$&$K$J$j$^$9!#(B
\fB$B%7%0%J%k=hM}(B\fR$B$HAH$_9~$_%3%^%s%I(B \fInohup\fR $B$NItJ,$b8+$F$/$@$5$$!#(B
.TP 8
.B if (\fIexpr\fB) \fIcommand
.\"O If \fIexpr\fR (an expression, as described under \fBExpressions\fR)
.\"O evaluates true, then \fIcommand\fR is executed.
.\"O Variable substitution on \fIcommand\fR happens early, at the same time it
.\"O does for the rest of the \fIif\fR command.
.\"O \fIcommand\fR must be a simple command, not an alias, a pipeline, a command list
.\"O or a parenthesized command list, but it may have arguments.
.\"O Input/output redirection occurs even if \fIexpr\fR is
.\"O false and \fIcommand\fR is thus \fInot\fR executed; this is a bug.
\fIexpr\fR (\fB$B<0(B\fR $B$G2r@b$7$?<0(B) $B$NI>2A7k2L$,??$J$i!"(B
\fIcommand\fR $B$,<B9T$5$l$^$9!#(B
\fIcommand\fR $B$X$NJQ?tBeF~$O!"(B
\fIif\fR $B%3%^%s%I$N;D$j$NItJ,$G$NJQ?tBeF~$HF1;~$K@h$K9T$o$l$^$9!#(B
\fIcommand\fR $B$OC1=c$J%3%^%s%I$G$J$1$l$P$J$i$:!"(B
$B%(%$%j%"%9!&%Q%$%W%i%$%s!&(B($B3g8L$G3g$i$l$?(B/$B$i$l$J$$(B) $B%3%^%s%I%j%9%H(B
$B$O;XDj$G$-$^$;$s!#$?$@$70z?t$O;XDj$G$-$^$9!#(B
\fIexpr\fR $B$,56$G!"(B
\fIcommand\fR $B$,(B\fI$B<B9T$5$l$J$$(B\fR$B>l9g$G$b(B
$BF~=PNO%j%@%$%l%/%7%g%s$O9T$o$l$F$7$^$$$^$9!#(B
$B$3$l$O%P%0$G$9!#(B
.PP
.B if (\fIexpr\fB) then
.br
\&...
.br
.B else if (\fIexpr2\fB) then
.br
\&...
.br
.B else
.br
\&...
.PD 0
.TP 8
.B endif
.\"O If the specified \fIexpr\fR is true then the commands to the
.\"O first \fIelse\fR are executed; otherwise if \fIexpr2\fR is true then
.\"O the commands to the second \fIelse\fR are executed, etc.  Any
.\"O number of \fIelse-if\fR pairs are possible; only one \fIendif\fR is
.\"O needed.  The \fIelse\fR part is likewise optional.  (The words
.\"O \fIelse\fR and \fIendif\fR must appear at the beginning of input lines;
.\"O the \fIif\fR must appear alone on its input line or after an
.\"O \fIelse\fR.)
$B;XDj$7$?(B \fIexpr\fR $B$,??$N>l9g!"(B
$B:G=i$N(B \fIelse\fI $B$^$G$N%3%^%s%I72$,<B9T$5$l$^$9!#(B
\fIexpr\fR $B$,56$G(B \fIexpr2\fR $B$,??$N>l9g$O!"(B
$BFsHVL\$N(B \fIelse\fR $B$^$G$N%3%^%s%I72$,<B9T$5$l$^$9!#0J2<F1$8$G$9!#(B
\fIelse-if\fR $B$N%Z%"$O$$$/$D$G$b;XDj$G$-$^$9$,!"(B
\fIendif\fR $B$O$R$H$D$7$+$$$j$^$;$s!#(B
$B$^$?(B \fIelse\fR $BIt$O>JN,2DG=$G$9!#(B
(\fIelse\fR $B$H(B \fIendif\fR $B$N3FC18l$OF~NO9T$N@hF,$K$7$+CV$1$^$;$s!#(B
\fIif\fR $B$OF~NO9T$N@hF,$KC1FH$GCV$/$+!"(B
\fIelse\fR $B$N8e$KCV$/$+$7$J$1$l$P$J$j$^$;$s!#(B)
.PD
.TP 8
.B inlib \fIshared-library\fR ... (+)
.\"O Adds each \fIshared-library\fR to the current environment.  There is no way
.\"O to remove a shared library.  (Domain/OS only)
$B3F(B \fIshared-library\fR $B$r8=:_$N4D6-$KDI2C$7$^$9!#(B
$B6&M-%i%$%V%i%j$r:o=|$9$kJ}K!$O$"$j$^$;$s!#(B  (Domain/OS $B$N$_(B)
.TP 8
.B jobs \fR[\fB\-l\fR]
.\"O Lists the active jobs.  With \fB\-l\fR, lists process
.\"O IDs in addition to the normal information.  On TCF systems, prints
.\"O the site on which each job is executing.
$B%"%/%F%#%V$J%8%g%V$r%j%9%H$7$^$9!#(B
\fB\-l\fR $B$r;XDj$9$k$H!"(B
$BDL>o$N>pJs$K2C$($F%W%m%;%9(B ID $B$b%j%9%H$7$^$9!#(B
TCF $B%7%9%F%`$G$O!"3F%8%g%V$,<B9T$5$l$F$$$k%5%$%H$bI=<($7$^$9!#(B
.PP
.\"O .B kill \fR[\fB\-\fIsignal\fR] \fB%\fIjob\fR|\fIpid\fR ...
.PD 0
.TP 8
.B kill \-l
.\"O The first form sends the specified \fIsignal\fR (or, if none is given,
.\"O the TERM (terminate) signal) to the specified jobs or processes.
.\"O \fIjob\fR may be a number, a string, `', `%', `+' or `\-' as described
.\"O under \fBJobs\fR.
.\"O Signals are either given by number or by name (as given in
.\"O \fI/usr/include/signal.h\fR, stripped of the prefix `SIG').
.\"O There is no default \fIjob\fR; saying just `kill' does not send a signal
.\"O to the current job.  If the signal being sent is TERM (terminate)
.\"O or HUP (hangup), then the job or process is sent a
.\"O CONT (continue) signal as well.
.\"O The second form lists the signal names.
$B:G=i$N7A<0$O(B \fIsignal\fR $B$r(B
($B2?$b;XDj$5$l$J$1$l$P(B TERM (terminate) $B%7%0%J%k$r(B)
$B;XDj$7$?%8%g%V$d%W%m%;%9$KAw$j$^$9!#(B
\fIjob\fR $B$K$O(B\fB$B%8%g%V(B\fR $B$G2r@b$5$l$F$$$k$h$&$K!"(B
$B?tCM(B, $BJ8;zNs(B, `', `%', `+', `\-' $B$N$I$l$+$r;XDj$G$-$^$9!#(B
$B%7%0%J%k$O?tCM$^$?$OL>A0(B (\fI/usr/include/signal.h\fR
$B$K$"$k$b$N$+$iA0$N(B `SIG' $B$r<h$j=|$$$?$b$N(B) $B$N$$$:$l$+$GM?$($^$9!#(B
$B%G%U%)%k%H$N(B \fIjob\fR $B$O$"$j$^$;$s!#(B
$BC1$K(B `kill' $B$H$7$F$b!"8=:_$N%8%g%V$X$O%7%0%J%k$rAw$j$^$;$s!#(B
TERM (terminate) $B$^$?$O(B HUP (hangup) $B%7%0%J%k$rAw$C$?>l9g$O!"(B
$B$=$N%8%g%V$d%W%m%;%9$K$O(B CONT (continue) $B%7%0%J%k$bAw?.$5$l$^$9!#(B
$BFsHVL\$N7A<0$O%7%0%J%k$NL>A0$r%j%9%H$7$^$9!#(B
.PD
.ig \" Obsolete tcsh command
.TP 8
.B linedit \fR(+)
A synonym for the \fIecho\fR builtin command.
..
.TP 8
.B limit \fR[\fB\-h\fR] [\fIresource\fR [\fImaximum-use\fR]]
.\"O Limits the consumption by the current process and each
.\"O process it creates to not individually exceed \fImaximum-use\fR on
.\"O the specified \fIresource\fR.  If no \fImaximum-use\fR is given, then
.\"O the current limit is printed; if no \fIresource\fR is given, then
.\"O all limitations are given.  If the \fB\-h\fR flag is given, the
.\"O hard limits are used instead of the current limits.  The
.\"O hard limits impose a ceiling on the values of the current
.\"O limits.  Only the super-user may raise the hard limits, but
.\"O a user may lower or raise the current limits within the legal range.
$B8=:_$N%W%m%;%9$H!"(B
$B8=:_$N%W%m%;%9$,@8@.$9$k%W%m%;%9$,>CHq$9$k;q8;$,!"(B
$B;XDj$7$?(B \fIresource\fR $B$KBP$7$F%W%m%;%9$R$H$D$K$D$-(B
\fImaximum-use\fR $B$r1[$($J$$$h$&$K$7$^$9!#(B
\fImaximum-use\fR $B$r;XDj$7$J$$$H!"(Bcurrent limit $B$,I=<($5$l$^$9!#(B
\fIresource\fI $B$r;XDj$7$J$$$H!"A4$F$N@)8BCM$rI=<($7$^$9!#(B
\fB\-h\fR $B%U%i%0$r;XDj$9$k$H!"(B
current limit $B$NBe$o$j$K(B hard limit $B$rMQ$$$^$9!#(B
hard limit $B$O(B current limit $B$N8BEY$rM?$($^$9!#(B
hard limit $B$O%9!<%Q!<%f!<%6!<$7$+A}$d$9$3$H$,$G$-$^$;$s$,!"(B
current limit $B$O0lHL%f!<%6$b2DG=$JHO0OFb$GA}8:$G$-$^$9!#(B
.\"nakano
.\"WORD:	hard limit
.\"WORD:	current limit
.RS +8
.PP
.\"O Controllable resources currently include \fIcputime\fR (the
.\"O maximum number of cpu-seconds to be used by each process),
.\"O \fIfilesize\fR (the largest single file which can be created),
.\"O \fIdatasize\fR (the maximum growth of the data+stack region via
.\"O sbrk(2) beyond the end of the program text), \fIstacksize\fR (the
.\"O maximum size of the automatically-extended stack region),
.\"O \fIcoredumpsize\fR (the size of the largest core dump that will be created),
.\"O and \fImemoryuse\fR, the maximum amount of physical memory a process
.\"O may have allocated to it at a given time.
$B8=:_@)8f$G$-$k;q8;$O!"(B
\fIcputime\fR ($B%W%m%;%9$R$H$D$K$D$-MxMQ$G$-$k(B cpu $BIC(B)$B!&(B
\fIfilesize\fR ($B:n@.$G$-$kC10l%U%!%$%k$N:GBg%5%$%:(B)$B!&(B
\fIdatasize\fR ($B%W%m%0%i%`%F%-%9%H$N=*C<$r1[$($F(B sbrk(2) $B$GA}$d$;$k(B
$B%G!<%?NN0h(B+$B%9%?%C%/NN0h$N:GBg%5%$%:(B)$B!&(B
\fIstacksize\fR ($B<+F0E*$K3HD%$5$l$k%9%?%C%/NN0h$N:GBg%5%$%:(B)$B!&(B
\fIcoredumpsize\fR ($B@8@.$5$l$k%3%"%@%s%W$N:GBg%5%$%:(B)$B!&(B
\fImemoryuse\fR
($B%W%m%;%9$R$H$D$K$$$A$I$-$K3d$jEv$F$k$3$H$N$G$-$kJ*M}%a%b%j$N:GBg%5%$%:(B)$B!"(B
$B$G$9!#(B
.PP
.\"O \fImaximum-use\fR may be given as a (floating point or
.\"O integer) number followed by a scale factor.  For all limits
.\"O other than \fIcputime\fR the default scale is `k' or `kilobytes'
.\"O (1024 bytes); a scale factor of `m' or `megabytes' may also
.\"O be used.  For \fIcputime\fR the default scaling is `seconds',
.\"O while `m' for minutes or `h' for hours, or a time of the
.\"O form `mm:ss' giving minutes and seconds may be used.
\fImaximum-use\fR $B$OIbF0>.?tE@CM$^$?$O@0?tCM$K!"(B
$BC10L$r$D$1$F;XDj$7$^$9!#(B
\fIcputime\fR $B0J30$N@)8BCM$O!"(B`k' $B$^$?$O(B
`kilobytes' (1024 $B%P%$%H(B) $B$r%G%U%)%k%H$NC10L$H$7$F$$$^$9!#(B
$BC10L$H$7$F(B `m' $B$^$?$O(B `megabytes' $B$rMQ$$$k$3$H$b$G$-$^$9!#(B
\fIcputime\fR $B$N%G%U%)%k%H$NC10L$O(B `seconds' $B$G$9!#(B
$BJ,$rI=$9(B `m'$B!";~4V$rI=$9(B `h'$B!"J,(B+$BIC$rI=$9(B
`mm:ss' $B$N7A<0$J$I$rMQ$$$k$3$H$b$G$-$^$9!#(B
.PP
.\"O For both \fIresource\fR names and scale factors, unambiguous
.\"O prefixes of the names suffice.
\fIresource\fR $B$bC10L$b!"B>$H6hJL$,$D$/HO0O$G8eH>It$r>JN,2DG=$G$9!#(B
.RE
