From 7037f90d4dd7b4c50c8e6be042aa32ec6391edcd Mon Sep 17 00:00:00 2001 From: tg Date: Wed, 10 Nov 2004 17:22:14 +0000 Subject: [PATCH] sync and bump to 1.16 --- README | 19 ++---- sh.1tbl | 152 ++++++++++++++++++++++++++++-------------------- tests/version.t | 2 +- version.c | 14 ++--- 4 files changed, 103 insertions(+), 84 deletions(-) diff --git a/README b/README index a57c95c..4642110 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -$MirBSD: README,v 1.4 2004/10/28 11:11:16 tg Exp $ +$MirBSD: README,v 1.5 2004/11/10 17:22:12 tg Exp $ This is the README for mirbsdksh, developed as part of the MirBSD operating system at The MirOS Project, and produced portably. @@ -26,10 +26,10 @@ to your likes. Don't complain if anything doesn't work. LEGAL INFORMATION -This package as a whole is placed under the MirOS licence, found at -https://mirbsd.bsdadvocacy.org/cvs.cgi/src/share/misc/licence.template -as well as on top of the "Build.sh" or "rnd.c" files found in the -distribution. +This package as a whole is placed under the MirOS licence template +as contained in the "version.c" source code file in this distribu- +tion, by having the project leader asserting a collective copyright. + The files alloc.c (Marc Espie), ksh.1tbl and sh.1tbl (University of California, Berkeley) are provided under a 2-clause or 3-clause BSD licence, respectively. @@ -40,6 +40,7 @@ aclocal.m4, from which only the functions which required the file to be under the GNU GPL have been removed. +The information below is mostly unmaintained. ________________________________________________________________________ $OpenBSD: README,v 1.10 2003/03/10 03:48:16 david Exp $ @@ -79,17 +80,9 @@ them). Files of interest: - NEWS short list of noticeable changes in various versions. CONTRIBUTORS short history of pdksh, people who contributed, etc. NOTES lists of known bugs in pdksh, at&t ksh, and posix. PROJECTS list of things that need to be done in pdksh. - BUG-REPORTS list of recently reported bugs that have been fixed - and all reported bugs that haven't been fixed. - LEGAL A file detailing legal issues concerning pdksh. - etc/* system profile and kshrc files used by Simon J. Gerraty. - misc/README* readme files from previous versions. - misc/Changes* changelog files from previous versions. - os2/* files and info needed to compile ksh on os/2. tests/* pdksh's regression testing system. diff --git a/sh.1tbl b/sh.1tbl index 51af5a2..db50f02 100644 --- a/sh.1tbl +++ b/sh.1tbl @@ -1,6 +1,7 @@ -.\" $MirBSD: sh.1tbl,v 1.10 2004/10/28 16:49:48 tg Exp $ -.\" _MirBSD: src/bin/ksh/ksh.1tbl,v 1.34 2004/10/28 16:49:13 tg Exp $ -.\" $OpenBSD: ksh.1tbl,v 1.72 2004/08/07 16:46:58 millert Exp $ +.\" $MirBSD: sh.1tbl,v 1.11 2004/11/10 17:22:13 tg Exp $ +.\" _MirBSD: src/bin/ksh/ksh.1tbl,v 1.41 2004/11/10 17:18:29 tg Exp $ +.\" $OpenBSD: ksh.1tbl,v 1.78 2004/11/08 23:42:02 jmc Exp $ +.\" $OpenBSD: sh.1tbl,v 1.52 2004/11/09 21:56:54 jmc Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -33,10 +34,10 @@ .\" .\" @(#)ksh.1tbl 8.2 (Berkeley) 8/19/96 .\" -.Dd April 7, 2004 +.Dd November 10, 2004 .Dt SH 1 .Os MirOS -.\" define Mx macro for portable mksh +.\" define Mx macro for portable mksh, just in case... .de Mx .nr cF \\n(.f .nr cZ \\n(.s @@ -48,11 +49,14 @@ . if "\\$1"6" \&MirOS #6\\*(aa . if "\\$1"." \&MirOS\\$1\\*(aa . if "\\$1"," \&MirOS\\$1\\*(aa +. if "\\$1"MirBSD" \&MirBSD\\*(aa .\} .. .Sh NAME +.Nm ksh , +.Nm mksh , .Nm sh -.Nd MirOS Bourne shell (derived from pdksh) +.Nd MirBSD Korn/Bourne shell .Sh SYNOPSIS .Nm .Op Fl +abCefhiklmnprsuvxX @@ -68,8 +72,11 @@ .Xc .Sh DESCRIPTION .Nm -is a reimplementation of the Bourne shell, a command interpreter for both -interactive and script use. +is a command interpreter intended for both interactive and shell +script use. +Its command language is a superset of the +.Xr sh C +shell language and compatible to the original Bourne shell. .Ss Shell startup The following options can be specified only on the command line: .Bl -tag -width Ds @@ -472,6 +479,15 @@ are only recognized if they are unquoted and if they are used as the first word of a command (i.e., they can't be preceded by parameter assignments or redirections): .Pp +.\" .TS +.\" center; +.\" lfB lfB lfB lfB lfB . +.\" case else function then ! +.\" do esac if time [[ +.\" done fi in until { +.\" elif for select while } +.\" .TE +.\" .Ic case , do , done , elif , .Ic else , esac , fi , for , .Ic function , if , in , @@ -817,8 +833,8 @@ the sequence of characters contains four fields: .Sq A , .Sq B , -.Sq "" -and +.Sq +(an empty field) and .Sq D . Note that if the .Ev IFS @@ -830,17 +846,17 @@ Also, note that the field splitting applies only to the immediate result of the substitution. Using the previous example, the substitution for $VAR:E results in the fields: -.Dq A , -.Dq B , -.Dq , +.Sq A , +.Sq B , +.Sq "" and -.Dq D:E , +.Sq D:E , not -.Dq A , -.Dq B , -.Dq , +.Sq A , +.Sq B , +.Sq "" and -.Dq E . +.Sq E . This behavior is POSIX compliant, but incompatible with some other shell implementations which do field splitting on the word which contained the substitution or use @@ -1252,7 +1268,13 @@ above for details. This parameter is not imported from the environment when the shell is started. .It Ev SH_VERSION -The version of the shell and the date the version was created (read-only). +The version of the shell, consisting of the upstream +.Nm pdksh +version (and sometimes date), the string +.Dq MirOS +and the +.Xr rcs 1 +revision number (read-only). .It Ev LINENO The line number of the function or shell script that is currently being executed. @@ -1293,7 +1315,18 @@ below. The process ID of the shell's parent (read-only). .It Ev PS1 The primary prompt for interactive shells. -The prompt is printed verbatim (i.e., no substitutions are done). +Parameter, command, and arithmetic +substitutions are performed. +.Ql \&! +is replaced with the current command number (see the +.Ic fc +command below). +A literal +.Ql \&! +can be put in the prompt by placing +.Ql !! +in +.Ev PS1 . Default is .Dq \&$\ \& for non-root users, @@ -1408,7 +1441,6 @@ represent itself it must be quoted or appear later in the list. Like .Ic \&[ Ns .. Ns Ic \&] , except it matches any character not inside the brackets. -.Sm on Matches any string of characters that matches zero or more occurrences of the specified patterns. Example: The pattern @@ -1488,9 +1520,14 @@ but the original .Xr ksh , Bourne .Xr sh -and +and GNU .Xr bash -do, so this may have to change (too bad). +do. +For +.Nm pdksh , +this may have to change (too bad), but +.Nm mksh +will not adopt this behaviour. .Pp Note that none of the above pattern elements match either a period .Pq Sq \&. @@ -3810,10 +3847,15 @@ signal and the shell exits. .Xr wait 2 , .Xr getopt 3 , .Xr rand 3 , +.Xr random 3 , .Xr signal 3 , +.Xr srand 3 , +.Xr srandom 3 , .Xr system 3 , .Xr environ 7 .Pp +.Pa http://docsrv.sco.com:507/en/man/html.C/sh.C.html +.Pp .Rs .%A Morris Bolsky .%A David Korn @@ -3853,14 +3895,16 @@ traditional Bourne or compliant shells is an issue. .Pp .Nm mksh -is the common name for the -.Mx -Korn shell installed in +is the name for the portable version of +.Mx MirBSD +.Nm ksh +installed as .Pa /bin/mksh -or -.Pa /usr/local/bin/mksh -on foreign systems, installed from the portable mirbsdksh sources at -.Pa http://wiki.mirbsd.de/MirbsdKsh . +on other, foreign, operating systems. +Visit +.Pa http://wiki.mirbsd.de/MirbsdKsh +to obtain the latest version of +.Nm mksh . .Sh AUTHORS This shell is based on the public domain 7th edition Bourne shell clone by Charles Forsyth and parts of the BRL shell by Doug A. Gwyn, Doug Kingston, @@ -3884,34 +3928,26 @@ The file in the source distribution contains a more complete list of people and their part in the shell's development. .Sh BUGS -Any bugs in -.Nm pdksh -should be reported to pdksh@cs.mun.ca. -Do not forget to report to the +Send bug reports for +.Nm +to the .Mx -developer team as well, because the modifications -imposed may have introduced different behaviour. +development team at +.Aq miros\-discuss@66h.42h.de . Please include the version of -.Nm pdksh +.Nm .Po -.Ic echo $SH_VERSION +.Ic echo $KSH_VERSION shows it .Pc , -the machine, operating system, and compiler you are using and a description of -how to repeat the bug (a small shell script that demonstrates the bug is best). -The following, if relevant (if you are not sure, include them), can also be -helpful: options you are using (both -.Pa options.h -and -.Ic set Fl o Ic options ) -and a copy of your -.Pa config.h -(the file generated by the -.Pa configure -script). -New versions of -.Nm pdksh -can be obtained from \fBftp://ftp.cs.mun.ca/pub/pdksh\fR. +the machine, operating system, and compiler you are using and how you built +.Nm . +Please test if the bug appears with the latest version of the full +.Nm mksh +as well. +We do not extensively use nor support +.Nm sh , +but are accepting bug fixes for its behaviour as well. .Pp By the way, the most frequently reported bug is: .Bd -literal -offset indent @@ -3921,13 +3957,3 @@ $ echo hi | read a; echo $a # Does not print hi The .Nm pdksh author is aware of this and there is no need to report it. -For another known bug, refer to the comment above the -.Em complete-command -paragraph in the section -.Sx Emacs editing mode -in -.Xr ksh 1 . -.br -The -.Mx -team is luckily accepting fixes for known (and unknown) bugs. diff --git a/tests/version.t b/tests/version.t index 3e73e2e..86b75b2 100644 --- a/tests/version.t +++ b/tests/version.t @@ -5,5 +5,5 @@ category: pdksh stdin: echo $KSH_VERSION expected-stdout-pattern: - /PD KSH v5\.2\.14 MirOS \$Revision\: 1.15 \$ in (native )?KSH mode( as mksh)?/ + /PD KSH v5\.2\.14 MirOS \$Revision\: 1.16 \$ in (native )?KSH mode( as mksh)?/ --- diff --git a/version.c b/version.c index 164d5ad..dd7d0fe 100644 --- a/version.c +++ b/version.c @@ -1,4 +1,4 @@ -/** $MirBSD: version.c,v 1.15 2004/10/28 16:35:03 tg Exp $ */ +/** $MirBSD: version.c,v 1.16 2004/11/10 17:22:13 tg Exp $ */ /* $OpenBSD: version.c,v 1.12 1999/07/14 13:37:24 millert Exp $ */ /*- @@ -6,11 +6,11 @@ * Thorsten "mirabile" Glaser * * Licensee is hereby permitted to deal in this work without restric- - * tion, including unlimited rights to use, publically perform, modi- - * fy, merge, distribute, sell, give away or sublicence, provided the - * above copyright notices, these terms and the disclaimer are retai- - * ned in all redistributions, or reproduced in accompanying documen- - * tation or other materials provided with binary redistributions. + * tion, including unlimited rights to use, publicly perform, modify, + * merge, distribute, sell, give away or sublicence, provided all co- + * pyright notices above, these terms and the disclaimer are retained + * in all redistributions or reproduced in accompanying documentation + * or other materials provided with binary redistributions. * * Licensor hereby provides this work "AS IS" and WITHOUT WARRANTY of * any kind, expressed or implied, to the maximum extent permitted by @@ -26,7 +26,7 @@ #include "sh.h" const char ksh_version[] = - "@(#)PD KSH v5.2.14 MirOS $Revision: 1.15 $ in " + "@(#)PD KSH v5.2.14 MirOS $Revision: 1.16 $ in " #ifdef MIRBSD_NATIVE "native " #endif