[...]
> > Recent ksh93 has a lot of built-in commands that
> used to require
> > running external programs.
> 
> Is there any documentation about this feature?

The ksh93 man page includes some (but perhaps not all) information about builtin
commands.

The ksh93 built-in command "builtin" will list all such commands that it knows 
about.
Some are in the form of pathnames; they are described in the Korn Shell FAQ at
http://kornshell.com/doc/faq.html  as follows:
Q12.    When I type builtin, I notice that some of these are full pathnames.
What does this mean?
A12.    Builtins that are not bound to pathnames are always searched
        for before doing a path search.  Builtins that are bound
        to pathnames are only executed when the path search would
        bind to this pathname.

The FAQ also mentions that one can add one's own built-in commands.
(where the text below says "mail" I think it means "main")
Q4.     How do I add built-in commands?
A4.     There are two ways to do this.  One is write a shared library
        with functions whose names are b_xxxx where xxxx is the name of
        the builtin.  The function b_xxxx takes three argument.  The first
        two are the same as a mail program.  The third parameter is
        a pointer argument which will point to the current shell context.
        The second way is to write a shared library with a function named
        lib_init().  This function will be called with an argument of 0
        after the library is loaded.  This function can add built-ins
        with the sh_addbuiltin() API function.  In both cases, the
        library is loaded into the shell with the "builtin" utility.


The folks working on ksh93 integration have submitted at least one ARC
request recently to add additional built-in shell commands.  So there's
a pretty good chance that even without any rewrites, existing ksh93 scripts
that use those will get faster once they become available.  Look through
arc-discuss in the forums or mail archives if you're curious.  I don't think
it will say what build they're targeting though, so no idea when that might
become available.
-- 
This message posted from opensolaris.org
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to