Home | History | Annotate | Download | only in sh
History log of /src/bin/sh/builtins.def
RevisionDateAuthorComments
 1.29  09-Oct-2024  kre PR bin/58687 -- implement suspend as a builtin in sh

Requested by uwe@ in PR bin/58687 without objections from
anyone except me, here is an implementation of a suspend
builtin command for /bin/sh

The sh.1 man page is updated, naturally, to describe it.

This new builtin does not exist in SMALL shells -- as used
on (some) boot media, etc.

If this turns out not to be useful, it can easily be removed.
 1.28  09-Oct-2024  kre Housekeeping.

Improve some comments, and sort the list of builtins, to make it easier
to find what is there and what isn't (since some have multiple different
command names, sort by the internal function name). Still leave the
commented out, could be implemented, but haven't ones, almost to last,
and the almost never indluded debug command absolute last.

NFCI. (No changes should be visible externally).
 1.27  10-Nov-2021  kre branches: 1.27.4;

Ensure that all of the POSIX standard utilities are correctly
identified with the -u flag (that is, I hope I identified all
the ones that were missing it).

This change is a no-op (NFC) as the -u flag does nothing.

Still, just in case we find a use for it one day, and just as a
matter of general principle, we should get this correct.
 1.26  14-Feb-2019  kre Add the "specialvar" built-in command. Discussed (well, mentioned
anway) on tech-userlevel with no adverse response.

This allows the magic of vars like HOSTNAME SECONDS, ToD (etc) to be
restored should it be lost - perhaps by having a var of the same name
imported from the environment (which needs to remove the magic in case
a set of scripts are using the env to pass data, and the var name chosen
happens to be one of our magic ones).

No change to SMALL shells (or smaller) - none of the magic vars (except
LINENO, which is exempt from all of this) exist in those, hence such a
shell has no need for this command either.
 1.25  15-May-2017  kre branches: 1.25.10;

DEBUG mode shell update (changes nothing for shells which are not
compiled for DEBUG.)

Add debug builtin command, and corresponding -D command line option.
As usual, for DEBUG related stuff, read the source for info, that's
all there is about this.

This completes the infrastructure changes for the updated DEBUG TRACE
mechanism, so now converting the rest of the shell's internal tracing
can happen as desired - piecemeal.
 1.24  02-Feb-2017  christos branches: 1.24.2;
Add fdflags builtin. Discussed with Chet and he has implemented it for
bash too.
 1.23  10-May-2015  joerg branches: 1.23.2; 1.23.4;
Include printf by default even for SMALL builds. It is used e.g. by
dhcpcd and as such required by most ramdisk images. Allow turning it off
again by TINYPROG.
 1.22  31-Dec-2012  dsl branches: 1.22.10;
Add support for '%n' being a shorthand for 'fg %n'.
 1.21  13-Jul-2004  seb branches: 1.21.48; 1.21.54;
Add new builtin `wordexp' to support wordexp(3).

From FreeBSD.
Provided in PR lib/26123.
Approved by kleink@.
 1.20  06-Jun-2004  christos don't include the printf builtin if we are SMALL; saves 10K.
 1.19  22-Aug-2003  itojun remove \r (agc, are you using MS-DOS?)
 1.18  22-Aug-2003  agc Move 4 more files from UCB 4 clause to 3 clause licence.

Thanks to Julio Merino for pointing them out.
 1.17  04-May-2003  gmcgarry Add new builtin 'inputrc' which allows keybindings to be redefined
for the current shell. From Arne H Juul in PR#10097.
 1.16  24-Nov-2002  christos Fixes from David Laight:
- ansification
- format of output of jobs command (etc)
- job identiers %+, %- etc
- $? and $(...)
- correct quoting of output of set, export -p and readonly -p
- differentiation between nornal and 'posix special' builtins
- correct behaviour (posix) for errors on builtins and special builtins
- builtin printf and kill
- set -o debug (if compiled with DEBUG)
- cd src obj (as ksh - too useful to do without)
- unset -e name, remove non-readonly variable from export list.
(so I could unset -e PS1 before running the test shell...)
 1.15  09-Apr-2000  christos PR/9847: Geoff C. Wing: Make test(1) a builtin.
 1.14  14-Mar-1997  christos branches: 1.14.4;
NO_HISTORY->SMALL
 1.13  06-Feb-1997  christos add type builtin.
 1.12  11-May-1995  christos branches: 1.12.6;
Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0
bug.
 1.11  21-Mar-1995  cgd convert to new RCS id conventions.
 1.10  04-Nov-1994  jtc ulimit builtin (PR #388)

This public domain code, originally by Doug Gwyn, Doug Kingston, Eric
Gisin, and Michael Rendell was ripped from pdksh 5.0.8 and hacked for
use with ash.
 1.9  11-Jun-1994  mycroft Add RCS ids.
 1.8  14-May-1994  cgd add back in support for building w/o obj dir. also, add NO_HISTORY
define, which (if you invoke mkbuiltins properly) gets you a sh w/o
history of command line editing (for floppy sh).
 1.7  11-May-1994  jtc reintegrate NetBSD's false builtin
 1.6  11-May-1994  jtc temporarily disable printf builtin
 1.5  11-May-1994  jtc sync with 4.4lite
 1.4  07-Jul-1993  jtc IEEE 1003.2 (D11.2.2.3) requires that the system's true and false be accessed
instead of searching $PATH. The best way to satisfy this requirement is to
make them builtins.

True was allready builtin, this patch adds false.
 1.3  23-Mar-1993  cgd changed "Id" to "Header" for rcsids
 1.2  22-Mar-1993  cgd added rcs ids to all files
 1.1  21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2  11-May-1994  jtc 44lite code
 1.1.1.1  21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.12.6.1  04-Mar-1997  mycroft Pull up latest sh(1). Fixes yet more bugs.
 1.14.4.1  03-Jun-2000  he Pull up revision 1.15 (requested by he):
Enable test as a shell builtin. Fixes PR#9847.
 1.21.54.1  25-Feb-2013  tls resync with head
 1.21.48.1  23-Jan-2013  yamt sync with head
 1.22.10.1  04-Jun-2015  msaitoh Pull up following revision(s) (requested by martin in ticket #821):
bin/sh/builtins.def: revision 1.23
bin/sh/Makefile: revision 1.101
Include printf by default even for SMALL builds. It is used e.g. by
dhcpcd and as such required by most ramdisk images. Allow turning it off
again by TINYPROG.
 1.23.4.1  21-Apr-2017  bouyer Sync with HEAD
 1.23.2.1  20-Mar-2017  pgoyette Sync with HEAD
 1.24.2.1  19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.25.10.3  21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.25.10.2  21-Apr-2020  martin Sync with HEAD
 1.25.10.1  10-Jun-2019  christos Sync with HEAD
 1.27.4.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed