summaryrefslogtreecommitdiffstats
path: root/bin/sh
Commit message (Collapse)AuthorAgeFilesLines
* Fix ';' command when used with -e flag.cracauer1999-10-261-1/+8
| | | | PR: bin/14509
* Implement ulimit -b for RLIMIT_SBSIZE.green1999-10-091-1/+4
|
* Mdoc cleanup, with a few grammar cleanups on the side.sheldonh1999-10-071-498/+922
| | | | Reviewed by: mpp
* Correct some hard sentence breaks. Only those surrounding the previoussheldonh1999-09-141-61/+65
| | | | | | | | commit and those which cause ugly nroff output have been fixed, since the purpose of the style guideline which they contravene is to reduce the sizes of deltas. Reported by: bde
* Improve shell documentation:sheldonh1999-09-082-32/+44
| | | | | | | | | | | | | | | | | | | | | | | | | * Consistently misspell built-in as builtin. * Add a builtin(1) manpage and create builtin(1) MLINKS for all shell builtin commands for which no standalone utility exists. These MLINKS replace those that were created for csh(1). * Add appropriate xrefs for builtin(1) to the csh(1) and sh(1) manpages, as well as to the manpages of standalone utilities which are supported as shell builtin commands in at least one of the shells. In such manpages, explain that similar functionality may be provided as a shell builtin command. * Improve sh(1)'s description of the cd builtin command. Csh(1) already describes it adequately. Replace the cd(1) manpage with a builtin(1) MLINKS link. * Clean up some mdoc problems: use Xr instead of literal "foo(n)"; use Ic instead of Xr for shell builtin commands. * Undo English contractions. Reviewed by: mpp, rgrimes
* Revert to using .Xr for builtins. The cross-references don't work now,sheldonh1999-08-311-5/+5
| | | | | | but that doesn't mean that they will never work. Requested by: mpp, rgrimes
* Clean-up:sheldonh1999-08-301-69/+160
| | | | | | | | | | Fix grammar and spelling nits. Use .Dq and .Qq where appropriate. Divorce trailing punctuation from quoted elements. Use .Dq instead of .Xr for builtins. Remove trailing whitespace and blank lines. PR: 13340
* $Id$ -> $FreeBSD$peter1999-08-2769-71/+71
|
* Make the behaviour of `read -e', ie. treating backslashes as special,tg1999-08-262-17/+21
| | | | | | | the default. Add -r option for the read builtin to reverse this. PR: 13274 Reviewed by: cpiazza, hoek, sheldonh
* Fix handling of the cd command inside evaluations. It was changing PWD,sheldonh1999-07-191-1/+2
| | | | | | | | which it should not do. PR: 12578 Reported by: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> Submitted by: Niall Smart <niall@pobox.com>
* Various spelling/formatting changes.kris1999-05-088-17/+17
| | | | Submitted by: Philippe Charnier <charnier@xp11.frmug.org>
* First set of fixes to keep egcs happy. These include {} around singleimp1999-04-252-5/+4
| | | | | | | | | | statement if blocks[*] when the else could be ambiguous, not defaulting to int type and removal of some unused variables. [*] This is explicitly allowed by style(9) when the single statement spans more than one line. Reviewed by: obrien, chuckr
* Next approach to make loops in interactive interruptable.cracauer1999-04-214-13/+17
| | | | PR: bin/9173
* Typo fix.max1999-04-191-3/+3
|
* Remove my temporary detection for PR 7059, Tor Egge fixed this bug.cracauer1999-04-131-5/+1
| | | | PR: 7059
* During variable expansion, the internal representation of the expressiontegge1999-04-131-5/+5
| | | | | might be relocated. Handle this case. PR: 7059
* Fix typo in source-explaining comment.cracauer1999-04-121-2/+2
|
* Add a guarded abort() for the problem in PR bin/7059 (no fix so far,cracauer1999-04-121-17/+33
| | | | | | | | this is hairy). Reformat this file to comply to style(9). It had mixed styles before. PR: bin/7059
* When a variable expansion is enclosed in double quotes, the internaltegge1999-04-092-16/+56
| | | | | | | | | | | representation of the expression is quoted. Take care of this when doing pattern matching in conjunction with trimming. #!/bin/sh c=d:e; echo "${c%:e}" PR: NetBSD PR#7231 Noticed by: Havard Eidnes <Havard.Eidnes@runit.sintef.no>
* In interactive shells, break loops to the topmost level when a childcracauer1999-04-031-1/+6
| | | | | | | | | is killed by a signal. (In non-interactive shells - that means a shellscript - the shell just exits, this was already working) PR: bin/9173
* Implement -a flag. A test shell script can be found atcracauer1999-04-032-4/+5
| | | | | | | | | http://www.cons.org/cracauer/download/sh-interrupt/testsuite/test_export.sh The PR also had test cases the new version passes. Fix typo in comment. PR: bin/1030
* -T was missing in the synopsis line.cracauer1999-04-021-2/+2
| | | | Submitted by: BDE
* The immediate execution of traps I introduced in September 1998 (tocracauer1999-04-014-7/+23
| | | | | | | | | | make /etc/rc interruptible in cases when programs hang with blocked signals) isn't standard enough. It is now switched off by default and a new switch -T enables it. You should update /etc/rc to the version I'm about to commit in a few minutes to keep it interruptible.
* sh doesn't support <> redirections.brian1999-03-311-4/+2
| | | | PR: 7325
* Add references to test(1) and expr(1).jkoshy1998-12-181-1/+4
|
* Free memory from setmode.imp1998-12-161-2/+3
| | | | Obtained from: OpenBSD
* Fixed warnx format errors in printf and csh, and snprintf format errorsbde1998-12-071-2/+12
| | | | | | in sh, by using separate macros for the 1, 2 and 3-arg calls to warnx. (The 3-arg warnx macro in sh/bltin/bltin.h used to require bogus dummy args.)
* Fix typo. "If the an entry" --> "If an entry"billf1998-12-021-2/+2
| | | | | PR: docs/8140 Submitted by: Sue Blake <sue@vedanix.welearn.com.au>
* Be more consistent with handling of quote mark control character.tegge1998-09-134-72/+28
| | | | | | | Don't output double-quotes inside variable expansion/arithmetic expansion region in here-documents. When leaving the arithmetic expansion syntax mode, adjust the dblquote flag according to previous syntax, in order to avoid splitting of quoted variables.
* Narrow down conditions to break wait() to process traps.cracauer1998-09-102-5/+6
| | | | Improve comments.
* Fix an inefficiency I introduced in my last commit.cracauer1998-09-102-10/+6
| | | | Include "expand.h" vom memalloc.c to pull function declartion into scope
* If traps are set, they are now executed even when a signal-blockingcracauer1998-09-083-10/+27
| | | | | | | | | | | | foreground child is running. Formerly, traps were exceuted after the next child exit. The enables the user to put a breaking wrapper around a blocking application: (trap 'echo trap ; exit 1' 2; ./pestyblocker; echo -n) The "echo -n" after the child call is needed to prevent sh from optimizing the trap-executing shell away. I'm working on this.
* Better handling of word splitting. Don't record the same regiontegge1998-09-067-49/+231
| | | | | | multiple times when performing nested variable expansion, and preserve some quoting information in order to avoid removing apparently empty expansion result.
* Don't blindly eliminate `..' and the previous pathname component.tegge1998-09-062-19/+160
| | | | | PR: 2541 Obtained from: NetBSD
* Improve bookkeeping of in_waitcmd and style fixes.cracauer1998-08-257-27/+41
| | | | Submitted by: Bruce Evans
* Re-enable killing childs with SIGQUIT. Spotted by Bruce Evans.cracauer1998-08-251-2/+2
|
* Got two volatile sig_atomic_t and int mixed up. Spotted by Gary Palmer.cracauer1998-08-242-4/+4
|
* Do not exit on SIGINT in non-interactive shells, fixes PR 1206,cracauer1998-08-249-45/+92
| | | | | | | | | | | | | | | | | | | | | | | | | i.e. this makes emacs usable from system(3). Programs called from shellscripts are now required to exit with proper signal status. That means, they have to kill themself. Exiting with faked numerical exit code is not sufficient. Exit with proper signal status if script exits on signal. Make the wait builtin interruptable, both with and without traps set. Use volatile sig_atomic_t where (and only where) appropriate. (Almost) fix printing of newlines on SIGINT. Make traps setable from trap handlers. This is needed for shellscripts that catch SIGINT for cleanup work but intend to exit on it, hance have to kill themself from a trap handler. I.e. mkdep. While I'm at it, make it -Wall clean. -Wall is not enabled in Makefile, since vararg warnx() macro calls in usr.bin/printf/printf.c are not -Wall-able. PR: 1206 Obtained from: Basic SIGINT fix from Bruce Evans
* Document behaviour of "-" and "--" on the command line.jkoshy1998-07-301-2/+7
| | | | PR: docs/5399
* Added a `build-tools' target for internal tools.bde1998-07-071-4/+3
| | | | | | Removed explicit dependencies of foo.o on foo.c. These were mainly placeholders for comments about missing dependencies of tools objects on headers. This problem needs to be handled more generally.
* Add rcsid. Spelling.charnier1998-05-1827-79/+127
|
* Backed out previous backout. Put y.tab.h back in SRCS.bde1998-05-061-10/+6
|
* Backed out previous commit. It was tested, but not for the case wherebde1998-05-051-4/+8
| | | | | a separate object tree doesn't exist. Crufty makefiles will have to put y.tab.h in SRCS so that we know not to create foo.h from foo.y.
* Fixed races in `make -jN' using new yacc rules.bde1998-05-041-8/+4
|
* When calling a shell function, remember whether exit status is tested.cracauer1998-05-041-2/+5
| | | | | | This is needed for the '-e' option. See the PR for more details. PR: 6047 Reviewed by: PR submitter, silence on review request.
* Backed out most of rev.1.19 (explicit dependencies of object filesbde1998-04-261-19/+1
| | | | on generated headers). This is now handled generally in bsd.prog.mk.
* Explicitly describe the rules the shell uses to search for a filejdp1998-02-121-1/+10
| | | | sourced by the "." command.
* Back out my previous attempt to fix SIGINT/SIGTERM behaviourcracauer1998-02-061-16/+0
|
* Fix handling of SIGINT/SIGQUIT for foreground subprocesses. Mostcracauer1998-02-061-1/+17
| | | | | | | | | | | | | | | | urgent need is when you run sh around a program that intentionally uses SIGQUIT/SIGINT for asynchronous events, i.e. $EDITOR started from system(2), like many mailers do. This fixes PR bin/1206 and possibly bin/4241. The solution committed has been tested for a large number of possible cases (see recent discussion on cvs-committers). I completed a make world, made sure 'make world' is interruptable and used the changed /bin/sh as a login shell all day, including job control and using SIGQUIT-catching programs (to write this message :-). PR: bin/1206 Reviewed by: discussion on cvs-commiters
* Correct a bogon in an example.steve1998-01-021-2/+2
| | | | | PR: 5415 Submitted by: Sergei S. Laskavy <laskavy@pc759.cs.msu.su>
OpenPOWER on IntegriCloud