mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
New selection of default libcmd /opt/ast/bin built-ins
Note that this is only about the /opt/ast/bin built-in commands, not about the regular pathless builtins such as printf. To use these, either add /opt/ast/bin to your $PATH or use a command like 'builtin cp'. As usual, --man provides info. Removed as defaults for lack of convincing advantages over the OS's external commands: - chmod, cmp, head, logname, mkdir, sync, uname, wc Remain as useful defaults: - basename, cat, cut, dirname. These are commonly used in performance-sensitive code paths in scripts and having them as built-ins can be good for performance. - getconf: This is the only interface to some libast internals that is available to ksh. It's also has better functionality than most OS-shipped 'getconf' commands, e.g., it can list and query all the configuration values. Added as defaults: - cp, ln, mv: Having these built in can speed up scripts that manage files. Also the AST versions have extended functionality (see cp --man, etc.). - mktemp: External mktemp commands vary too widely and are incompatible, but it's important that scripts can securely make temporary files, so it's good to ship a known interface to this functionality. As a result, the statically linked ksh binary is very slightly smaller than before. Resolves: https://github.com/ksh93/ksh/issues/349
This commit is contained in:
parent
60e0687cec
commit
7cdb01f625
3 changed files with 13 additions and 11 deletions
|
|
@ -135,18 +135,14 @@ const struct shtable3 shtab_builtins[] =
|
|||
#include SHOPT_CMDLIB_HDR
|
||||
#else
|
||||
CMDLIST(basename)
|
||||
CMDLIST(chmod)
|
||||
CMDLIST(cat)
|
||||
CMDLIST(cp)
|
||||
CMDLIST(cut)
|
||||
CMDLIST(dirname)
|
||||
CMDLIST(getconf)
|
||||
CMDLIST(head)
|
||||
CMDLIST(mkdir)
|
||||
CMDLIST(logname)
|
||||
CMDLIST(cat)
|
||||
CMDLIST(cmp)
|
||||
CMDLIST(cut)
|
||||
CMDLIST(uname)
|
||||
CMDLIST(wc)
|
||||
CMDLIST(sync)
|
||||
CMDLIST(ln)
|
||||
CMDLIST(mktemp)
|
||||
CMDLIST(mv)
|
||||
#if !_std_malloc && !_AST_std_malloc
|
||||
CMDLIST(vmstate) /* vmstate only works with vmalloc */
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue