summaryrefslogtreecommitdiffstats
path: root/bin/sh
Commit message (Collapse)AuthorAgeFilesLines
* Remove a hack for an ancient gdb.stefanf2005-08-151-13/+4
|
* Recent cleanups made it possible to bump WARNS to 3.stefanf2005-08-141-1/+1
|
* Put the comparison with PEOF into a new macro is_eof(). Don't use it if thestefanf2005-08-132-6/+8
| | | | character comes from a string.
* Declare echocmd() and testcmd().stefanf2005-08-131-0/+2
|
* Use assignment rather than comparison.stefanf2005-08-131-2/+2
|
* - Provide all initialisers for a struct event.stefanf2005-08-131-5/+6
| | | | | - Include init.h in the generated init.c. - Generate prototypes and put the brace on the next line.
* First declare the functions to pacify -Wmissing-prototypes.stefanf2005-08-131-0/+4
|
* Include missing headers.stefanf2005-08-132-0/+2
|
* Use prototypes in the MKINIT lines collected by mkinit.stefanf2005-08-133-3/+3
|
* Use prototypes in the generated builtins.{c,h} files.stefanf2005-08-131-3/+3
|
* cvs -d stefanf@ncvs.FreeBSD.org:/home/ncvsstefanf2005-08-133-5/+9
|
* El_parse's third parameter is now const-qualified, add a cast.stefanf2005-08-111-1/+1
|
* Fix a bug when shell expansion is done against dangling symlinks, bydelphij2005-07-071-1/+1
| | | | | | | | | | | | converting the stat() call to a lstat() call, which will cover the situation. One can exercise this bug by referring a dangling link with something like */the-link. Approved by: re (scottl) Submitted by: Simon 'corecode' Schubert [corecode fs ei tum de] Obtained from: NetBSD via DragonFlyBSD (NetBSD rev. 1.51 and DragonFly rev. 1.6) MFC After: 3 days
* Sorted sections and fixed prompt (PS[12]) strings.ru2005-06-141-11/+11
| | | | Approved by: re (blanket)
* Put the description of the -c option in the right place, asru2005-06-141-7/+9
| | | | | | | | | promised by the Argument List Processing section introduction. What follows the option in the options list is its long name, not its argument (as is the case for the -c option). Also sort references in the SEE ALSO section. Approved by: re (blanket)
* A second attempt to adjust option-parsing on a shell command, for thegad2005-05-161-1/+20
| | | | | | | | | | benefit of scripts start out as: #!/bin/sh -- # -*- perl -*- With this fix in place, we can commit a change to kern/imgact_shell.c so FreeBSD will process the `#!' line in shell-scripts in a more standard fashion. PR: 16393 Mentioned on: freebsd-arch
* Various sh(1) enhancements:keramida2005-04-151-10/+83
| | | | | | | | - Move the description of the ``-c string'' option closer to the option itself. - Add an ENVIRONMENT section (1) - Add more .Xr cross references to the SEE ALSO section. Obtained from: NetBSD (1)
* Use ``.Pq Ql'' to quote single characters, instead of ``.Pq Li''.keramida2005-03-041-17/+17
| | | | | | | This makes the resulting output more aesthetically pleasing in text-only terminals: Reviewed by: ru
* Add a section describing the exit status of the shell.keramida2005-03-041-0/+8
| | | | Obtained from: NetBSD
* Support \H, \h, \w, \W, \$ string expansion in the prompt.obrien2005-03-011-4/+91
| | | | Submitted by: mini
* Change /bin/sh so *it* implements the processing needed for scripts togad2005-02-161-11/+43
| | | | | | | | | | | | | | | | | | | | | | work as expected when they have a "shebang line" of: #!/bin/sh -- # -*- perl -*- -p This specific line is recommended in some perl documentation, and I think I've seen similar lines in documentation for ruby and python. Those write-ups expect `sh' to ignore everything after the '--' if the first thing after the '--' is a '#'. See chapter 19, "The Command-Line Interface" in 3rd edition of "Programming Perl", for some discussion of why perl recommends using this line in some circumstances. The above line does work on solaris, irix and aix (as three data points), and it used to work on FreeBSD by means of a similar patch to execve(). However, that change to execve() effected *all* shells (which caused other problems), and that processing was recently removed. PR: 16393 (the original request to fix the same issue) Reviewed by: freebsd-current (looking at a slightly different patch) MFC after: 1 week
* /*- or .\"- or #- to begin license clauses.imp2005-01-1014-4/+31
|
* Scheduled mdoc(7) sweep.ru2005-01-091-1/+1
|
* Correct typo.ceri2005-01-041-1/+1
|
* o Add a missed "." .maxim2004-12-021-1/+1
| | | | | Reviewed by: ru MFC after: 3 weeks
* o Terminate an endless loop sh -T goes into in dowait() around waitproc().maxim2004-12-021-1/+2
| | | | | | | | | | | | XXX from Tor: "The shell can also go into a similar loop if the child was killed by signal 127, since the shell would believe the child to have only stopped (WIFSTOPPED() macro returns nonzero value). Disallowing signals 127 and 128 will fix that problem." See kern/19402 for details. PR: bin/66242 Submitted by: tegge Analysis and testcase by: demon MFC after: 3 weeks
* When listing the special $ variables, ($!, $#, etc) list them as $!alfred2004-11-011-12/+16
| | | | | | | | instead of just !, this allows one to more easily locate/understand the section of the manpage in question. Additional wording correction by: keramida Reviewed by: keramida
* Attempting to unset an undefined variable or function should not bedes2004-09-272-2/+2
| | | | | | | | considered an error according to the Open Group Base Specification. PR: standards/45738 Submitted by: Matthias Andree <matthias.andree@web.de> MFC after: 3 days
* Document missing multibyte character handling in utilities specifiedtjr2004-07-031-1/+5
| | | | by POSIX.
* Deal with double whitespace.ru2004-07-031-1/+1
|
* Mechanically kill hard sentence breaks.ru2004-07-022-96/+192
|
* Include <stdio.h> for a sprintf() prototype.stefanf2004-05-241-0/+2
| | | | Approved by: das (mentor)
* Document the "return" built-in better: it will exit . (sources) andgreen2004-04-141-1/+7
| | | | the top-level shell instance, too.
* Remove clause 3 from the UCB licenses.markm2004-04-0666-264/+0
| | | | OK'ed by: imp, core
* Install /bin/sh safely. This allows a shell script to be usedru2004-03-181-0/+1
| | | | | | | to strip binaries by specifying it in the STRIPBIN environment variable honoured by install(1). MFC after: 3 days
* style.Makefile:johan2004-02-231-1/+1
| | | | Use WARNS?= instead of WARNS=
* style(9): wrap at 80 columns.njl2004-02-121-3/+5
|
* Handle proper formatting and a buffer overrun when running an old sh onnjl2004-02-121-7/+28
| | | | | | | a system that has sys_nsig > NSIG (i.e. when libc is upgraded.) Submitted by: Matt Dillon Reviewed by: bde
* Fixed style of DPADD and LDADD assignments as per style.Makefile(5).ru2004-02-051-2/+2
|
* Commit fix sent by Tor Egge <Tor.Egge@cvsup.no.freebsd.org>cracauer2004-02-051-1/+1
| | | | | | | | | | Only use return value from system call if system call succeeded. Tested with `make world` and some of my own scripts. This should be MFCed soon. While /bin/sh is hard to test the fix is obviously correct and can be assumed not to break something else (famous last words...).
* Use sys_nsig instead of NSIG for the length of the signal arrays. Thisnjl2004-01-282-6/+6
| | | | | | | is important if we add new signals later. From DragonflyBSD: jobs.c:1.4, trap.c:1.3. Obtained from: DragonflyBSD
* The PR diff I committed recently had one bug noticed bycracauer2004-01-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | Joe Marcus Clarke <marcus@FreeBSD.ORG>, subshells could lose a non-zero exit status. This commit is Joe's proposed patch. Thanks! I verified that the problem Joe found is fixed and I ran a full world with this patch. I don't plan to ever commit language patches to /bin/sh again. It is a minefield too big to navigate without a full-time committment, which I am not willing to do on our /bin/sh. Under normal circumstances I would recommend using NetBSD's sh which has a lot of language fixes (like the ones what these patches were about) but unfortunately they had implemented broken signal behaviour for shellscript containing interactive programs. Similar issues apply to pdksh which is OpenBSD's sh. From my perspective bash2 is the only really working bourne sh out there and that one is GPLed. Oh well.
* Replace home-grown dup2() implementation with actual dup2() calls. Thisdes2004-01-215-43/+13
| | | | | | | should slightly reduce the number of system calls in critical portions of the shell, and select a more efficient path through the fdalloc code. Reviewed by: bde
* Removed duplicate y.tab.h from SRCS and CLEANFILES.ru2004-01-201-1/+1
|
* o Spell 'diretories' correctly.maxim2003-12-301-1/+1
| | | | | | PR: misc/60730 Submitted by: Eugene Grosbein MFC after: 3 days
* PR 28852cracauer2003-12-281-24/+1
| | | | | | | | | | | | | | | sh -e behaviour was incorrect when && and || statements where used in "if" clauses. This is the patch submitted by MORI Kouji <mori@tri.asanuma.co.jp>. It fixes the issue at hand, but sh fixes like this are super-hard to verify that they don't break anything else. I ran some of my old test cases and a few big GNU configure scripts that detected mistakes before, with the previous sh, patched sh and bash. No differences in behaviour found. MFC recommended after longer than usual time. Compiles on i386 and sledge.
* Do not assume there is only a space between #define and the macro nameschweikh2003-09-131-1/+1
| | | | | | | | when grepping for JOBS. The recent style cleanup replaced the space with a tab and broke job control detection. Little edits, disastrous consequences. Submitted by: Peter Edwards <pmedwards@eircom.net> X-MFC when: in about 5 weeks with the other sh arithmetic fixes.
* mdoc(7): Use the new feature of the .In macro.ru2003-09-081-1/+1
|
* Fix testing of arith_assign() value for $((a=15)).schweikh2003-09-071-1/+1
| | | | Submitted by: Enache Adrian <enache@rdslink.ro>
* #include <string.h> for prototypes for strcpy() and strlen().tjr2003-09-061-0/+2
| | | | Submitted by: Stefan Farfeleder
OpenPOWER on IntegriCloud