summaryrefslogtreecommitdiffstats
path: root/bin/sh
Commit message (Collapse)AuthorAgeFilesLines
* Fix the borokeness that crept in with rev 1.10 of parser.c, the shjoerg1996-02-032-3/+6
| | | | | | | | didn't correctly start background jobs anymore. Strange that nobody was complaining... Add a dummy target for `builtins' in the Makefile, to prevent it from attempting to build this file by compiling builtins.c. :-/
* Restored formatting from the old printf/printf.c.bde1995-12-141-5/+5
|
* The shell incorrectly gave & precedence over ;. This breaks thejoerg1995-12-101-23/+19
| | | | | | | | | | | traditional behaviour, and it violates Posix.2. Fixes PR # bin/880: /bin/sh incorrectly parse... Fixes also an earlier problem report about the shell not evaluating loops correctly. (Not files via GNATS.) Submitted by: nnd@itfs.nsk.su (Nickolay N. Dudorov)
* Move out some of the shell builtin bogosity from printf's source tojoerg1995-12-101-1/+10
| | | | sh's builtin/bltin.h.
* A fix for the "cd -" coredump on a brand new /bin/sh. The problem waspeter1995-11-141-2/+5
| | | | | | noticed on a NetBSD bugs mailing list but this is entirely my own work. Inspired by: Scott Reynolds <scottr@plexus.com>, for NetBSD
* Implement allowing 'set -v' in the middle of a script to work.peter1995-11-031-78/+103
| | | | | | | | | | | | | | | This means that a script containing: echo 1 set -v echo 2 will now produce output, like it does on SYSV machines and other 'proper' /bin/sh implementations.. This is done by a slight restructure of the input processor allowing it to read chunks from the file at a time, but process the data by line from the chunk. Obtained from: Christos Zoulas for NetBSD. <christos@deshaw.com>
* o rename ulimit -p into ulimit -u, so we are in agreement with bashjoerg1995-10-213-7/+12
| | | | | | | o fix brokeness for 1>&5 redirection, where `5' was an invalid file descriptor, but no error message has been generated o fix brokeness for redirect to/from myself case
* Implement the "ulimit" builtin. This is the analogon to csh's "limit"joerg1995-10-193-3/+269
| | | | | | | | | command and badly needed in sh(1) for everybody who wants to modify the system-wide limits from inside /etc/rc. The options are similar to other system's implemantations of this command, with the FreeBSD additions for -m (memoryuse) and -p (max processes) that are not available on other systems.
* Fix my breakage of the $0 handling during $ENV processing.joerg1995-10-091-2/+2
| | | | Since the broken version went into 2.1, this fix should, too.
* Make the mkinit internal command issue an #undef for each #define, tojoerg1995-10-011-3/+15
| | | | avoid "duplicate definition" warnings.
* Posixize:joerg1995-10-011-1/+4
| | | | | | | | | | | | | | sh -c [-aCefinuvx] command_string [ command_name [argument ...] ] 1 4.56.3 Options -c Read commands from the command_string operand. Set the value of special parameter 0 (see 3.5.2) from the value of the command_name operand and the positional parameters ($1, $2, etc.) in sequence from the remaining argument operands. Pointed out by: Kaleb Keithly (kaleb@x.org)
* Fix relocation of job table.bde1995-09-211-1/+8
| | | | | | while { sleep 1 & wait; } do echo 1; done corrupted the job table every 4th iteration.
* Don't dereference a NULL pointer in the case of a null pipe.dg1995-09-201-2/+3
| | | | | | | e.g.: ls |> foo.out sh now behaves the same as it does under SunOS 4.x for this case.
* Sigh. This will become a never ending story. :-(joerg1995-08-281-1/+4
| | | | | | When comparing my recent parser change against the ash in 1.1.5.1, i found that a couple of other problems in the same area has been fixed there, but not in 2.2. Semicolons and EOF do also delimit words...
* Make the shell handle a null command in a &&/|| sequence correctly.joerg1995-08-273-4/+8
| | | | | | | | | | | | | The && and || tokens do also terminate a command, not only the newline. While i was at it, disabled trace code by default, it served no good purpose since it required the use of a debugger anyway to be turned on. Instead, placed a hint in the Makefile on how to turn it on. This makes the shell ~ 10 % faster and ~ 4 KB smaller. :) Pointed out by: jan@physik.TU-Berlin.DE (Jan Riedinger)
* Clean up compilation warnings.pst1995-08-231-1/+4
|
* sh(1) incorrectly ignored an EOF condition when looking for thejoerg1995-08-111-1/+5
| | | | | | closing backquote in a `foo` substitution. Discovered by: Martin Welk <mw@theatre.pandora.sax.de>
* Fix /bin/sh's broken handling of the builtin getopts(1). The optionsjoerg1995-08-061-3/+2
| | | | | | | ``-ffoo'' and ``-f foo'' have been treated differently. This has been in violation of Posix.2 (that deprecates -ffoo, but doesn't disallow it).
* Remove trailing whitespace.rgrimes1995-05-3016-58/+58
| | | | Reviewed by: phk
* typo there --> theiradam1995-05-051-9/+16
|
* From "Philippe Charnier" <charnier@lirmm.fr>:dg1995-05-051-1/+5
| | | | | | | | | There is a bug in sh: the built in command "fc -l" generates a core dump (*NULL in not_fcnumber). According to the sh manual page (fc -l [-nr] [first [last]]), fc -l is a correct sequence (in that case, values are defaulted to -16 and -1) but fails when first is not given.
* Make build work, even if there is no obj subdir.phk1995-03-301-3/+11
|
* Fix the deletion of trailing newlines with backquote expansion.guido1995-03-011-2/+4
| | | | | | Reviewed by: Submitted by: Obtained from:
* What I think is a more correct fix for the handling of backslashespaul1995-01-111-3/+3
| | | | inside backquotes. Reversed my previous fix.
* Fix a bug with handling backslash escapes inside some quotes.paul1995-01-091-2/+2
| | | | Should solve our problems with edit-pr.
* Obtained from: partly from 1.1.5bde1994-12-261-2/+4
| | | | | Convert "" to "." for "cd" and "cd ''". chdir("") is required to fail on POSIX systems.
* Add end of line check so mkinit doesn't produce garbage if you have apst1994-11-061-2/+2
| | | | | | | | MKINIT line that doesn't have a comment on it (we have at least two). This mkinit program was written by someone who obviously doesn't believe in defensive programming. :-( There's a LOT of work that needs to be done on this thing. :-( :-( :-(
* Get this braindead, mongoloid shell look in /stand for pwd if it can'tjkh1994-11-061-3/+8
| | | | | | | | | | find it in /bin. This is something of a kludge, I know, but consider my limited alternatives: I can't make this an execvp() without making people scream that I introduced a failure point or slowed down pwd, and I can't make it an optional macro since crunch doesn't let you pass arbitrary command-line args to the build of one of its crunch-ees. This is the simplest, if not the nicest looking, solution I could come up with.
* libcompat removedache1994-10-021-3/+3
|
* Added $Id$dg1994-09-2469-0/+97
|
* With '!' being made into a keyword (yech!), case cases didn't work properly.sef1994-09-141-11/+13
| | | | | | | | | | This should fix it (passed my test cases). Originally discovered with perl's Configure (well, in FreeBSD, I don't know how the NetBSD folks discovered it). Reviewed by: sef Submitted by: jtc@cygnus.com Obtained from: NetBSD
* Add dependencies on libraries to DPADD. Someday this should be donebde1994-08-281-0/+1
| | | | | | automagically. -lfoo has to be right to work, but ${LIBFO0} is too easy to forget or misspell; nothing checks it and it should be different for shared libraries.
* Touch init.c after making it in case mkinit refused to touch it after notbde1994-08-211-0/+1
| | | | | changing it. mkinit's attempted smartness about timestamps is mismatched with the makefile. init.o is compiled _twice_ the first time it is made...
* Got rid of stupid warning message.dg1994-08-181-11/+1
|
* Need ${LDFLAGS} one more place.rgrimes1994-05-301-1/+1
|
* Need to sue ${LDFLAGS} when building local binaries so they get builtrgrimes1994-05-291-4/+4
| | | | static if ${NOSHARED}==YES. This makes it easier to bootstrap a system.
* BSD 4.4 Lite bin Sourcesrgrimes1994-05-2669-0/+17397
OpenPOWER on IntegriCloud