[-1c?
@(#)$Id: builtin (AT&T Research) 2014-06-05 $
]
[+NAME?builtin - add, delete, or display shell built-ins]
[+DESCRIPTION?\bbuiltin\b can be used to add, delete, or display built-in commands in the current shell environment. A built-in command executes in the current shell process and can have side effects in the current shell. On most systems, the invocation time for built-in commands is one or two orders of magnitude less than commands that create a separate process.]
[+?For each \apathname\a specified, the basename of the pathname determines the name of the built-in. For each basename, the shell looks for a C level function in the current shell whose name is determined by prepending \bb_\b to the built-in name. If \apathname\a contains a \b/\b, then the built-in is bound to this pathname. A built-in bound to a pathname will only be executed if \apathname\a is the first executable found during a path search. Otherwise, built-ins are found prior to performing the path search.]
[+?If no \apathname\a operands are specified, then \bbuiltin\b displays the current list of built-ins, or just the special built-ins if \b-s\b is specified, on standard output. The full pathname for built-ins that are bound to pathnames are displayed.]
[+?Libraries containing built-ins can be specified with the \b-f\b option. If the library contains a function named \blib_init\b(), this function will be invoked with argument \b0\b when the library is loaded. The \blib_init\b() function can load built-ins by invoking an appropriate C level function. In this case there is no restriction on the C level function name.]
[+?The C level function will be invoked with three arguments. The first two are the same as \bmain\b() and the third one is a pointer.]
[+?\bbuiltin\b cannot be invoked from a restricted shell.]
[d?Deletes each of the specified built-ins. Special built-ins cannot be deleted.]
[f]:[lib?On systems with dynamic linking, \alib\a names a shared library to load and search for built-ins. Libraries are searched for in \b../lib/ksh\b and \b../lib\b on \b$PATH\b and in system dependent library directories. The system dependent shared library prefix and/or suffix may be omitted. Once a library is loaded, its symbols become available for the current and subsequent invocations of \bbuiltin\b. Multiple libraries can be specified with separate invocations of \bbuiltin\b. Libraries are searched in the reverse order in which they are specified.]
[n?Disable each of the specified built-ins. Special built-ins cannot be disabled.  If no built-ns are specified, display all disabled built-ins.]
[l?List the library base name, plugin YYYYMMDD version stamp, and full path for \b-f\b\alib\a on one line on the standard output.]
[p?Causes the output to be in a form of \bbuiltin\b commands that can be used as input to the shell to recreate the current set of builtins.]
[s?Display only the special built-ins.]

[pathname ...]

[+EXIT STATUS?]{
[+0?All \apathname\a operands and \b-f\b options processed successfully.]
[+>0?An error occurred.]
}
[+SEE ALSO?\bwhence\b(1)]
