summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rw-r--r--share/man/man1/Makefile29
-rw-r--r--share/man/man1/builtin.1259
-rw-r--r--share/man/man1/cd.198
3 files changed, 287 insertions, 99 deletions
diff --git a/share/man/man1/Makefile b/share/man/man1/Makefile
index 6fc2d4d..6c7e4bc 100644
--- a/share/man/man1/Makefile
+++ b/share/man/man1/Makefile
@@ -1,7 +1,34 @@
# @(#)Makefile 8.1 (Berkeley) 6/5/93
# $FreeBSD$
-MAN1= cd.1 intro.1 wait.1
+MAN1= builtin.1 intro.1 wait.1
MLINKS= intro.1 introduction.1
+# Create MLINKS for Shell built in commands for which there are no userland
+# utilities of the same name:
+MLINKS= builtin.1 alias.1 builtin.1 alloc.1 builtin.1 bg.1 \
+ builtin.1 break.1 builtin.1 breaksw.1 builtin.1 case.1 \
+ builtin.1 cd.1 builtin.1 chdir.1 builtin.1 command.1 \
+ builtin.1 continue.1 builtin.1 cwd.1 builtin.1 do.1 \
+ builtin.1 done.1 builtin.1 default.1 \
+ builtin.1 dirs.1 builtin.1 elif.1 builtin.1 else.1 \
+ builtin.1 end.1 builtin.1 endif.1 builtin.1 endsw.1 \
+ builtin.1 esac.1 builtin.1 eval.1 builtin.1 exec.1 \
+ builtin.1 exit.1 builtin.1 export.1 builtin.1 fc.1 \
+ builtin.1 fg.1 builtin.1 fi.1 builtin.1 for.1 \
+ builtin.1 foreach.1 builtin.1 getopts.1 builtin.1 glob.1 \
+ builtin.1 goto.1 builtin.1 hash.1 builtin.1 hashstat.1 \
+ builtin.1 history.1 builtin.1 if.1 builtin.1 jobid.1 \
+ builtin.1 jobs.1 builtin.1 limit.1 builtin.1 logout.1 \
+ builtin.1 notify.1 builtin.1 onintr.1 builtin.1 popd.1 \
+ builtin.1 pushd.1 builtin.1 readonly.1 builtin.1 rehash.1 \
+ builtin.1 repeat.1 builtin.1 set.1 builtin.1 setenv.1 \
+ builtin.1 setvar.1 builtin.1 shift.1 builtin.1 source.1 \
+ builtin.1 stop.1 builtin.1 suspend.1 builtin.1 switch.1 \
+ builtin.1 then.1 builtin.1 trap.1 builtin.1 type.1 \
+ builtin.1 ulimit.1 builtin.1 umask.1 builtin.1 unalias.1 \
+ builtin.1 unhash.1 builtin.1 unlimit.1 builtin.1 unset.1 \
+ builtin.1 unsetenv.1 builtin.1 until.1 builtin.1 wait.1 \
+ builtin.1 while.1
+
.include <bsd.prog.mk>
diff --git a/share/man/man1/builtin.1 b/share/man/man1/builtin.1
new file mode 100644
index 0000000..2c60dbd
--- /dev/null
+++ b/share/man/man1/builtin.1
@@ -0,0 +1,259 @@
+.\"
+.\" Copyright (c) 1999 Sheldon Hearn
+.\"
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 1, 1999
+.Dt BUILTIN 1
+.Os
+.Sh NAME
+.Nm builtin ,
+.Nm alias ,
+.Nm alloc ,
+.Nm bg ,
+.Nm break ,
+.Nm breaksw ,
+.Nm case ,
+.Nm cd ,
+.Nm chdir ,
+.Nm command ,
+.Nm continue ,
+.Nm cwd ,
+.Nm default ,
+.Nm dirs ,
+.Nm do ,
+.Nm done ,
+.Nm echo ,
+.Nm elif ,
+.Nm else ,
+.Nm end ,
+.Nm endif ,
+.Nm endsw ,
+.Nm esac ,
+.Nm eval ,
+.Nm exec ,
+.Nm exit ,
+.Nm export ,
+.Nm fc ,
+.Nm fg ,
+.Nm fi ,
+.Nm for ,
+.Nm foreach ,
+.Nm getopts ,
+.Nm glob ,
+.Nm goto ,
+.Nm hash ,
+.Nm hashstat ,
+.Nm history ,
+.Nm if ,
+.Nm jobid ,
+.Nm jobs ,
+.Nm kill ,
+.Nm limit ,
+.Nm login ,
+.Nm logout ,
+.Nm nice ,
+.Nm nohup ,
+.Nm notify ,
+.Nm onintr ,
+.Nm popd ,
+.Nm printf ,
+.Nm pushd ,
+.Nm pwd ,
+.Nm readonly ,
+.Nm rehash ,
+.Nm repeat ,
+.Nm set ,
+.Nm setenv ,
+.Nm setvar ,
+.Nm shift ,
+.Nm source ,
+.Nm stop ,
+.Nm suspend ,
+.Nm switch ,
+.Nm then ,
+.Nm time ,
+.Nm trap ,
+.Nm type ,
+.Nm ulimit ,
+.Nm umask ,
+.Nm unalias ,
+.Nm unhash ,
+.Nm unlimit ,
+.Nm unset ,
+.Nm unsetenv ,
+.Nm until ,
+.Nm wait ,
+.Nm which ,
+.Nm while
+.Nd shell builtin commands
+.Sh SYNOPSIS
+.Nm builtin
+.Op Fl options
+.Op Ar args ...
+.Sh DESCRIPTION
+Shell builtin commands are commands that can be executed within the
+running shell's process.
+Note that, in the case of
+.Xr csh 1
+builtin commands, the command is executed in a subshell if it occurs as
+any component of a pipeline except the last.
+.Pp
+If a command specified to the shell contains a slash
+.Dq \&/ ,
+the shell will not execute a builtin command, even if the last component
+of the specified command matches the name of a builtin command. Thus,
+while specifying
+.Dq Ic echo
+causes a builtin command to be executed under shells that support the
+builtin echo command,
+specifying
+.Dq Pa /bin/echo
+or
+.Dq Pa ./echo
+does not.
+.Pp
+While some builtin commands may exist in more than one shell, their
+operation may be different under each shell which supports them.
+Below is a table which lists shell builtin commands, the standard shells
+that support them and whether they exist as standalone utilities.
+.Pp
+Only builtin commands for the
+.Xr csh 1
+and
+.Xr sh 1
+shells are listed here. Consult the appropriate manual page for
+details on the operation of any given builtin command under those shells.
+Users of other shells will need to consult the documentation supplied
+with the other shells.
+.Bl -column "continueXX" "ExternalXX" "csh(1)" "sh(1)" -offset indent
+.\"
+.\" XXX:
+.\" The correct table header here can not be rendered with mdoc's current
+.\" argument maximum. When mdoc can handle sufficient arguments, the
+.\" correct table header will be as follows:
+.\" .It Em Command Ta Em External Ta Xr csh 1 Ta Xr sh 1
+.\"
+.It Em Command External csh sh
+.It Ic alias Ta \&No Ta Yes Ta Yes
+.It Ic alloc Ta \&No Ta Yes Ta \&No
+.It Ic bg Ta \&No Ta Yes Ta Yes
+.It Ic break Ta \&No Ta Yes Ta \&No
+.It Ic breaksw Ta \&No Ta Yes Ta \&No
+.It Ic case Ta \&No Ta Yes Ta Yes
+.It Ic cd Ta \&No Ta Yes Ta Yes
+.It Ic chdir Ta \&No Ta Yes Ta \&No
+.It Ic command Ta \&No Ta \&No Ta Yes
+.It Ic continue Ta \&No Ta Yes Ta \&No
+.It Ic cwd Ta \&No Ta Yes Ta \&No
+.It Ic default Ta \&No Ta Yes Ta \&No
+.It Ic dirs Ta \&No Ta Yes Ta \&No
+.It Ic do Ta \&No Ta \&No Ta Yes
+.It Ic done Ta \&No Ta \&No Ta Yes
+.It Ic echo Ta Yes Ta Yes Ta Yes
+.It Ic elif Ta \&No Ta \&No Ta Yes
+.It Ic else Ta \&No Ta Yes Ta \&No
+.It Ic end Ta \&No Ta Yes Ta \&No
+.It Ic endif Ta \&No Ta Yes Ta \&No
+.It Ic endsw Ta \&No Ta Yes Ta \&No
+.It Ic esac Ta \&No Ta \&No Ta Yes
+.It Ic eval Ta \&No Ta Yes Ta Yes
+.It Ic exec Ta \&No Ta Yes Ta Yes
+.It Ic exit Ta \&No Ta Yes Ta Yes
+.It Ic export Ta \&No Ta \&No Ta Yes
+.It Ic fc Ta \&No Ta \&No Ta Yes
+.It Ic fg Ta \&No Ta Yes Ta Yes
+.It Ic fi Ta \&No Ta \&No Ta Yes
+.It Ic for Ta \&No Ta \&No Ta Yes
+.It Ic foreach Ta \&No Ta Yes Ta \&No
+.It Ic getopts Ta \&No Ta \&No Ta Yes
+.It Ic glob Ta \&No Ta Yes Ta \&No
+.It Ic goto Ta \&No Ta Yes Ta \&No
+.It Ic hash Ta \&No Ta \&No Ta Yes
+.It Ic hashstat Ta \&No Ta Yes Ta \&No
+.It Ic history Ta \&No Ta Yes Ta \&No
+.It Ic if Ta \&No Ta Yes Ta \&No
+.It Ic jobid Ta \&No Ta \&No Ta Yes
+.It Ic jobs Ta \&No Ta Yes Ta Yes
+.It Ic kill Ta Yes Ta Yes Ta \&No
+.It Ic limit Ta \&No Ta Yes Ta \&No
+.It Ic login Ta Yes Ta Yes Ta \&No
+.It Ic logout Ta \&No Ta Yes Ta \&No
+.It Ic nice Ta Yes Ta Yes Ta \&No
+.It Ic nohup Ta Yes Ta Yes Ta \&No
+.It Ic notify Ta \&No Ta Yes Ta \&No
+.It Ic onintr Ta \&No Ta Yes Ta \&No
+.It Ic popd Ta \&No Ta Yes Ta \&No
+.It Ic printf Ta Yes Ta Yes Ta Yes
+.It Ic pushd Ta \&No Ta Yes Ta \&No
+.It Ic pwd Ta Yes Ta \&No Ta Yes
+.It Ic readonly Ta \&No Ta \&No Ta Yes
+.It Ic rehash Ta \&No Ta Yes Ta \&No
+.It Ic repeat Ta \&No Ta Yes Ta \&No
+.It Ic set Ta \&No Ta Yes Ta \&No
+.It Ic setenv Ta \&No Ta Yes Ta \&No
+.It Ic setvar Ta \&No Ta \&No Ta Yes
+.It Ic shift Ta \&No Ta Yes Ta Yes
+.It Ic source Ta \&No Ta Yes Ta \&No
+.It Ic stop Ta \&No Ta Yes Ta \&No
+.It Ic suspend Ta \&No Ta Yes Ta \&No
+.It Ic switch Ta \&No Ta Yes Ta \&No
+.It Ic then Ta \&No Ta \&No Ta Yes
+.It Ic time Ta Yes Ta Yes Ta \&No
+.It Ic trap Ta \&No Ta \&No Ta Yes
+.It Ic type Ta \&No Ta \&No Ta Yes
+.It Ic ulimit Ta \&No Ta \&No Ta Yes
+.It Ic umask Ta \&No Ta Yes Ta Yes
+.It Ic unalias Ta \&No Ta Yes Ta Yes
+.It Ic unhash Ta \&No Ta Yes Ta \&No
+.It Ic unlimit Ta \&No Ta Yes Ta \&No
+.It Ic unset Ta \&No Ta Yes Ta Yes
+.It Ic unsetenv Ta \&No Ta Yes Ta \&No
+.It Ic until Ta \&No Ta \&No Ta Yes
+.It Ic wait Ta \&No Ta Yes Ta Yes
+.It Ic which Ta Yes Ta Yes Ta \&No
+.It Ic while Ta \&No Ta Yes Ta \&No
+.El
+.Sh SEE ALSO
+.Xr csh 1 ,
+.Xr echo 1 ,
+.Xr kill 1 ,
+.Xr login 1 ,
+.Xr nice 1 ,
+.Xr nohup 1 ,
+.Xr printf 1 ,
+.Xr pwd 1 ,
+.Xr sh 1 ,
+.Xr time 1 ,
+.Xr which 1
+.Sh HISTORY
+The
+.Nm
+manual page first appeared in
+.Fx 4.0 .
+.Sh AUTHORS
+This manual page was written by
+.An Sheldon Hearn Aq sheldonh@FreeBSD.org .
diff --git a/share/man/man1/cd.1 b/share/man/man1/cd.1
deleted file mode 100644
index 2b812eb..0000000
--- a/share/man/man1/cd.1
+++ /dev/null
@@ -1,98 +0,0 @@
-.\" Copyright (c) 1980, 1990, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the Institute of Electrical and Electronics Engineers, Inc.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)cd.1 8.1 (Berkeley) 6/5/93
-.\" $FreeBSD$
-.\"
-.Dd June 5, 1993
-.Dt CD 1
-.Os BSD 4
-.Sh NAME
-.Nm cd
-.Nd change working directory
-.Sh SYNOPSIS
-.Nm cd
-.Ar directory
-.Sh DESCRIPTION
-.Ar Directory
-is an absolute or relative pathname which becomes the new working
-directory.
-The interpretation of a relative pathname by cd depends on the CDPATH
-environment variable (see below).
-.Sh ENVIRONMENT
-The following environment variables affect the execution of cd:
-.Pp
-.Bl -tag -width indent
-.It Ev CDPATH
-If the
-.Ar directory
-operand does not begin with a slash (/) character, and the first
-component is not dot (.) or dot-dot (..),
-.Nm cd
-searches for the directory relative to each directory named in the
-.Ev CDPATH
-variable, in the order listed.
-The new working directory is set to the first matching directory found.
-An empty string in place of a directory pathname represents the current
-directory.
-If the new working directory was derived from
-.Ev CDPATH ,
-it will be printed to the standard output.
-.It Ev HOME
-If
-.Nm cd
-is invoked without arguments and the
-.Ev HOME
-environment variable exists and contains a directory name, that directory
-becomes the new working directory.
-.El
-.Pp
-See
-.Xr csh 1
-for more information on environment variables.
-.Pp
-The
-.Nm cd
-utility exits 0 on success, and >0 if an error occurs.
-.Sh SEE ALSO
-.Xr csh 1 ,
-.Xr pwd 1 ,
-.Xr sh 1 ,
-.Xr chdir 2
-.Sh STANDARDS
-The
-.Nm cd
-command is expected to be
-.St -p1003.2
-compatible.
OpenPOWER on IntegriCloud