Commit Graph

26 Commits

Author SHA1 Message Date
kre 727a664bee 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.
2019-02-14 11:15:24 +00:00
kre ab36694a85 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.
2017-05-15 20:00:36 +00:00
christos 168f1d4a50 Add fdflags builtin. Discussed with Chet and he has implemented it for
bash too.
2017-02-02 20:00:40 +00:00
joerg 66e60a49ac 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.
2015-05-10 20:30:54 +00:00
dsl 658a58d038 Add support for '%n' being a shorthand for 'fg %n'. 2012-12-31 14:10:15 +00:00
seb cf788c3115 Add new builtin `wordexp' to support wordexp(3).
From FreeBSD.
Provided in PR lib/26123.
Approved by kleink@.
2004-07-13 15:05:59 +00:00
christos 95a737969b don't include the printf builtin if we are SMALL; saves 10K. 2004-06-06 07:03:11 +00:00
itojun 59a105b48a remove \r (agc, are you using MS-DOS?) 2003-08-22 14:21:12 +00:00
agc 3538d2653b Move 4 more files from UCB 4 clause to 3 clause licence.
Thanks to Julio Merino for pointing them out.
2003-08-22 11:22:23 +00:00
gmcgarry f8d2e9e189 Add new builtin 'inputrc' which allows keybindings to be redefined
for the current shell.  From Arne H Juul in PR#10097.
2003-05-04 01:05:24 +00:00
christos c02b3bbdf4 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...)
2002-11-24 22:35:38 +00:00
christos b252543484 PR/9847: Geoff C. Wing: Make test(1) a builtin. 2000-04-09 23:27:03 +00:00
christos 7accaec421 NO_HISTORY->SMALL 1997-03-14 01:42:18 +00:00
christos 680690d33c add type builtin. 1997-02-06 23:24:52 +00:00
christos 07bae7eddd Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0
bug.
1995-05-11 21:28:33 +00:00
cgd 49f0ad8601 convert to new RCS id conventions. 1995-03-21 09:01:59 +00:00
jtc 6cd3ad1d11 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.
1994-11-04 17:13:27 +00:00
mycroft cafd1f7e9f Add RCS ids. 1994-06-11 16:11:35 +00:00
cgd e3c63ad9f3 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).
1994-05-14 22:20:04 +00:00
jtc 542ace3bab reintegrate NetBSD's false builtin 1994-05-11 17:42:57 +00:00
jtc 714c2cc318 temporarily disable printf builtin 1994-05-11 17:14:22 +00:00
jtc 37ed7877b2 sync with 4.4lite 1994-05-11 17:09:42 +00:00
jtc 67893cfee5 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.
1993-07-07 01:11:56 +00:00
cgd 06be60083d changed "Id" to "Header" for rcsids 1993-03-23 00:22:59 +00:00
cgd 346aa5dd48 added rcs ids to all files 1993-03-22 08:04:00 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00