mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Release 1.0.0-beta.1
In May 2020, when every KornShell (ksh93) development project was abandoned, development was rebooted in a new fork based on the last stable AT&T version: ksh 93u+. Now, one year and hundreds of bug fixes later, the first beta version is ready, and KornShell lives again. This new fork is called ksh 93u+m as a permanent nod to its origin; a standard semantic version number is added starting at 1.0.0-beta.1. Please test the beta and report any bugs you find, or help us fix known bugs.
This commit is contained in:
parent
92f7ca5423
commit
246062ff0b
10 changed files with 305 additions and 35 deletions
|
@ -35,17 +35,22 @@ For more details, see the NEWS file and for complete details, see the git log.
|
|||
message instead of terminating the shell.
|
||||
- 'suspend' now refuses to suspend a login shell, as there is probably
|
||||
no parent shell to return to and the login session would freeze.
|
||||
If you really want to suspend a login shell, use 'kill -s STOP $$'.
|
||||
- 'times' now gives high precision output in a POSIX compliant format.
|
||||
|
||||
6. 'command' no longer expands aliases in its first argument, as this is
|
||||
no longer required after the foregoing change. In the unlikely event
|
||||
that you still need this behavior, you can set:
|
||||
6. 'command' and 'nohup' no longer expand aliases in their first argument,
|
||||
as this is no longer required after the foregoing change. In the
|
||||
unlikely event that you still need this behavior, you can set:
|
||||
alias command='command '
|
||||
alias nohup='nohup '
|
||||
|
||||
7. The undocumented 'login' and 'newgrp' builtin commands have been
|
||||
removed. These replaced your shell session with the external commands
|
||||
7. The 'login' and 'newgrp' special built-in commands have been removed,
|
||||
so it is no longer an error to define shell functions by these names.
|
||||
These built-ins replaced your shell session with the external commands
|
||||
by the same name, as in 'exec'. If an error occurred (e.g. due to a
|
||||
typo), you would end up immediately logged out. If you do want this
|
||||
typo), you would end up immediately logged out, except on a few
|
||||
commercial Unix systems whose 'login' and 'newgrp' cope with this
|
||||
by starting a new shell session upon error. If you do want the old
|
||||
behavior, you can restore it by setting:
|
||||
alias login='exec login'
|
||||
alias newgrp='exec newgrp'
|
||||
|
@ -55,13 +60,13 @@ For more details, see the NEWS file and for complete details, see the git log.
|
|||
use cases that are expected to work. For example:
|
||||
n='[0-9]'
|
||||
case $n in
|
||||
[0-9]) echo "$n is a number" ;;
|
||||
[0-9]) echo "$n is a digit" ;;
|
||||
esac
|
||||
would output "[0-9] is a number". In the unlikely event that a script
|
||||
would output "[0-9] is a digit". In the unlikely event that a script
|
||||
does rely on this behavior, it can be fixed like this:
|
||||
case $n in
|
||||
[0-9] | "[0-9]")
|
||||
echo "$n is a number or the number pattern" ;;
|
||||
echo "$n is a digit or the digit pattern" ;;
|
||||
esac
|
||||
|
||||
9. If 'set -u'/'set -o nounset' is active, then the shell now errors out
|
||||
|
@ -71,7 +76,7 @@ For more details, see the NEWS file and for complete details, see the git log.
|
|||
10. If 'set -u'/'set -o nounset' is active, then the shell now errors out
|
||||
if $! is accessed before the shell has launched any background process.
|
||||
|
||||
11. The 'print', 'printf' and 'echo' builtin commands now return a nonzero
|
||||
11. The 'print', 'printf' and 'echo' built-in commands now return a nonzero
|
||||
exit status if an input/output error occurs.
|
||||
|
||||
12. Four obsolete date format specifiers for 'printf %(format)T' were
|
||||
|
@ -80,7 +85,7 @@ For more details, see the NEWS file and for complete details, see the git log.
|
|||
- %f now returns a date with the format '%Y.%m.%d-%H:%M:%S'.
|
||||
- %q now returns the quarter of the current year.
|
||||
|
||||
13. The 'typeset' builtin now properly detects and reports options that
|
||||
13. The 'typeset' built-in now properly detects and reports options that
|
||||
cannot be used together if they are given as part of the same command.
|
||||
|
||||
14. The DEBUG trap has reverted to pre-93t behavior. It is now once again
|
||||
|
@ -118,14 +123,14 @@ For more details, see the NEWS file and for complete details, see the git log.
|
|||
ksh -c 'cd /var; PWD=/tmp cd /usr; echo $PWD'
|
||||
now prints '/bin' followed by '/var'.
|
||||
|
||||
23. Path-bound builtins (such as /opt/ast/bin/cat) can now be executed
|
||||
23. Path-bound built-ins (such as /opt/ast/bin/cat) can now be executed
|
||||
by invoking the canonical path, so the following will now work:
|
||||
$ /opt/ast/bin/cat --version
|
||||
version cat (AT&T Research) 2012-05-31
|
||||
$ (PATH=/opt/ast/bin:$PATH; "$(whence -p cat)" --version)
|
||||
version cat (AT&T Research) 2012-05-31
|
||||
In the event an external command by that path exists, the path-bound
|
||||
builtin will now override it when invoked using the canonical path.
|
||||
built-in will now override it when invoked using the canonical path.
|
||||
To invoke a possible external command at that path, you can still use
|
||||
a non-canonical path, e.g.: /opt//ast/bin/cat or /opt/ast/./bin/cat
|
||||
|
||||
|
|
|
@ -9,10 +9,7 @@ operating systems and machines that ksh-93 has been known to run on.
|
|||
Most of the source code for ksh is in the src/cmd/ksh93/sh
|
||||
directory. For information on what's where, see the file DESIGN.
|
||||
|
||||
A new '-o posix' shell option has been added to ksh 93u+m that makes the
|
||||
ksh language more compatible with other shells by following the POSIX
|
||||
standard more closely. See the manual page for details. It is enabled by
|
||||
default if ksh is invoked as sh, otherwise it is disabled by default.
|
||||
#### COMPILE-TIME OPTIONS ####
|
||||
|
||||
The SHOPT.sh file contains several compilation options that can be set
|
||||
before compiling ksh. Options are of the form SHOPT_option and become
|
||||
|
@ -22,11 +19,17 @@ A value of 0 represents off, 1 represents on, no value means probe. For
|
|||
options where no feature probe is available, probe is the same as off.
|
||||
|
||||
The options have the following defaults and meanings:
|
||||
|
||||
2DMATCH on Two-dimensional ${.sh.match} for ${var//pat/str}.
|
||||
|
||||
ACCT off Shell accounting.
|
||||
|
||||
ACCTFILE off Enable per user accounting info.
|
||||
|
||||
AUDIT off For auditing specific users
|
||||
|
||||
AUDITFILE "/etc/ksh_audit"
|
||||
|
||||
BGX on Enables background job extensions. Noted by "J" in the
|
||||
version string when enabled. (1) JOBMAX=n limits the
|
||||
number of concurrent background jobs to n; the (n+1)th
|
||||
|
@ -35,18 +38,26 @@ The options have the following defaults and meanings:
|
|||
completing background job gets its own trap; $! is set to
|
||||
the job pid and $? is set to the job exit status at the
|
||||
beginning of the trap.
|
||||
|
||||
BRACEPAT on C-shell type abc{d,e}f style file generation
|
||||
|
||||
CMDLIB_HDR "<cmdlist.h>"
|
||||
The header in which you can provide a custom list of
|
||||
libcmd commands to provide as path-bound built-ins.
|
||||
|
||||
CMDLIB_DIR "\"/opt/ast/bin\""
|
||||
The default virtual directory prefix for path-bound
|
||||
built-ins. The value must include double quotes.
|
||||
|
||||
CRNL off <cr><nl> treated as <nl> in shell grammar.
|
||||
|
||||
DEVFD Use the more secure /dev/fd mechanism instead of FIFOs for
|
||||
process substitutions. On by default on OSs with /dev/fd.
|
||||
|
||||
DYNAMIC on Dynamic loading of builtins. (Requires dlopen() interface.)
|
||||
|
||||
ECHOPRINT off Make echo equivalent to print.
|
||||
|
||||
EDPREDICT off Enables history pattern search menu. As you begin a line
|
||||
with a #, the following characters are treated as a shell
|
||||
pattern and cause matching lines from the history file to
|
||||
|
@ -54,15 +65,19 @@ The options have the following defaults and meanings:
|
|||
scroll up and down this list or you can use <ESC>nTAB to
|
||||
make this the current line (n defaults to 1 if omitted).
|
||||
Experimental. Bugs: https://github.com/ksh93/ksh/issues/233
|
||||
|
||||
ESH on Compile with emacs command line editing. The original
|
||||
emacs line editor code was provided by Mike Veach at IH.
|
||||
|
||||
FILESCAN on Experimental option that allows fast reading of files
|
||||
using while < file;do ...; done and allowing fields in
|
||||
each line to be accessed as positional parameters.
|
||||
|
||||
FIXEDARRAY on When using typeset, a name in the format NAME[N]
|
||||
creates a fixed-size array and any attempt to access a
|
||||
subscript N or higher is an error. Multidimensional
|
||||
fixed-size arrays NAME[N1][N2]... are also supported.
|
||||
|
||||
GLOBCASEDET Adds the 'globcasedetect' shell option. When this shell
|
||||
option is turned on, file name generation (globbing)
|
||||
and file name listing and completion automatically become
|
||||
|
@ -70,41 +85,65 @@ The options have the following defaults and meanings:
|
|||
between upper- and lowercase is ignored for file names.
|
||||
This compile-time option is enabled by default on operating
|
||||
systems that can support case-insensitive file systems.
|
||||
|
||||
HISTEXPAND on Enable !-style history expansion similar to csh(1).
|
||||
|
||||
KIA off Allow generation of shell cross reference database with -R.
|
||||
As of 2021-05-10, no tool that can parse this database is
|
||||
known. If you know of any, please contact us.
|
||||
|
||||
MULTIBYTE on Multibyte character handling. Requires mblen() and
|
||||
mbctowc().
|
||||
|
||||
NAMESPACE on Allows namespaces. This is experimental, incomplete
|
||||
and undocumented.
|
||||
|
||||
NOECHOE off Disable the '-e' option to the 'echo' command,
|
||||
unless SHOPT_ECHOPRINT is enabled.
|
||||
|
||||
OLDTERMIO off Use either termios or termio at runtime.
|
||||
|
||||
OPTIMIZE on Optimize loop invariants for with for and while loops.
|
||||
|
||||
PFSH off Compile with support for profile shell. (Solaris; obsolete)
|
||||
|
||||
P_SUID off If set, all real uids, greater than or equal to this
|
||||
value will require the -p flag to run suid/sgid scripts.
|
||||
|
||||
RAWONLY on Turn on if the vi line mode doesn't work right unless
|
||||
you do a set -o viraw.
|
||||
|
||||
REGRESS off Enable the __regress__ built-in command and instrumented
|
||||
intercepts for testing.
|
||||
|
||||
REMOTE off Set --rc (read profile scripts) even if ksh was invoked
|
||||
with standard input on a socket, i.e. as a remote shell.
|
||||
|
||||
SPAWN on Use posix_spawn(3) as combined fork/exec if job control
|
||||
is not active. Improves speed.
|
||||
|
||||
STATS on Add .sh.stats compound variable.
|
||||
|
||||
SUID_EXEC on Execute /etc/suid_exec for setuid, setgid script.
|
||||
|
||||
SYSRC Source /etc/ksh.kshrc on initializing an interactive
|
||||
shell. This is on by default if /etc/ksh.kshrc or
|
||||
/etc/bash.bashrc exists at compile time.
|
||||
|
||||
TEST_L Add 'test -l' as an alias for 'test -L'. This is on by
|
||||
default if the OS's external 'test' command supports it.
|
||||
|
||||
TIMEOUT off Set this to the number of seconds for timing out and
|
||||
exiting the shell when you don't enter a command. If
|
||||
non-zero, TMOUT can not be set larger than this value.
|
||||
|
||||
TYPEDEF on Enable typeset type definitions.
|
||||
|
||||
VSH on Compile with vi command line editing. The original vi
|
||||
line editor code was provided by Pat Sullivan at CB.
|
||||
|
||||
#### BUILDING KSH 93U+M ####
|
||||
|
||||
To build ksh (as well as libcmd and libast libraries on which ksh depends),
|
||||
cd to the top directory and run:
|
||||
|
||||
|
@ -139,7 +178,7 @@ For more information, run:
|
|||
Many other commands in this repo self-document via the --help, --man and
|
||||
--html options; those that do have no separate manual page.
|
||||
|
||||
Automated installation is not supported. To install manually:
|
||||
Automated installation is not supported yet. To install manually:
|
||||
|
||||
cp arch/$(bin/package host type)/bin/ksh /usr/local/bin/
|
||||
cp src/cmd/ksh93/sh.1 /usr/local/share/man/man1/ksh.1
|
||||
|
@ -165,12 +204,16 @@ and/or execute only script. Note, that ksh does not read the .profile
|
|||
or $ENV file when it the real and effective user/group id's are not
|
||||
equal.
|
||||
|
||||
#### TESTING KSH ####
|
||||
|
||||
The tests subdirectory contains a number of regression tests for ksh.
|
||||
To run all these tests with the shell you just built, run the command
|
||||
bin/shtests
|
||||
For help and more options, type
|
||||
bin/shtests --man
|
||||
|
||||
#### OTHER DOCUMENTATION ####
|
||||
|
||||
The file PROMO.mm is an advertisement that extolls the virtues of ksh.
|
||||
The file sh.1 contains the troff (man) description of this Shell.
|
||||
The file nval.3 contains the troff (man) description of the name-value
|
||||
|
@ -178,23 +221,20 @@ pair library that is needed for writing built-ins that need to
|
|||
access shell variables.
|
||||
|
||||
The file sh.memo contains a draft troff (mm) memo describing ksh. The
|
||||
file RELEASE88 contains the changes made for ksh88. The file RELEASE93
|
||||
contains the changes made in this release since ksh-88. The file
|
||||
RELEASE contains bug fixes made in this release since ksh-88. The file
|
||||
COMPATIBILITY contains a list of incompatibilities with ksh-88. The
|
||||
file bltins.mm is a draft troff (mm) memo describing how to write
|
||||
file builtins.mm is a draft troff (mm) memo describing how to write
|
||||
built-in commands that can be loaded at run time.
|
||||
|
||||
Please report any problems or suggestions to:
|
||||
The file NEWS in the top-level directory contains bug fixes and other
|
||||
changes made in the ksh 93u+m fork and supporting libraries. The file
|
||||
COMPATIBILITY contains a list of potential incompatibilities.
|
||||
|
||||
https://github.com/ksh93/ksh
|
||||
#### TESTED SYSTEMS ####
|
||||
|
||||
|
||||
ksh 93u+m 1.0.0 has been compiled and alpha tested on the following.
|
||||
ksh 93u+m 1.0.0.beta-1 has been compiled and tested on the following.
|
||||
An asterisk signifies minor regression test failures (one or two minor
|
||||
things amiss), two asterisks signify moderate regression test failures
|
||||
(some functionality does not work), and three asterisks signify serious
|
||||
failures (crashes, and/or essential functionality does not work).
|
||||
failures (crashes, and/or important functionality does not work).
|
||||
|
||||
* AIX 7.1 on RISC (PowerPC)
|
||||
* DragonFly BSD 5.8 on x86_64
|
||||
|
@ -207,9 +247,12 @@ failures (crashes, and/or essential functionality does not work).
|
|||
GNU/Linux: NixOS 19.09 on x86_64
|
||||
GNU/Linux: Slackware 14.2 on x86_64
|
||||
GNU/Linux: Ubuntu 16.04 on x86_64
|
||||
GNU/Linux: Ubuntu 18.04 on armv7l (32-bit)
|
||||
GNU/Linux: Ubuntu 20.04 on aarch64
|
||||
GNU/Linux: Void Linux (musl C library) on x86_64
|
||||
*** HP-UX B.11.11 on pa-risc
|
||||
* illumos: OmniOS 2020-08-19 (gcc) on x86_64
|
||||
macOS 10.13.6 (High Sierra) on x86_64
|
||||
macOS 10.14.6 (Mojave) on x86_64
|
||||
*** NetBSD 8.1 and 9.0 on x86_64
|
||||
* OpenBSD 6.8 on x86_64
|
||||
|
@ -219,6 +262,12 @@ failures (crashes, and/or essential functionality does not work).
|
|||
* UnixWare 7.1.4 on x86
|
||||
*** Windows 7 using Cygwin on x86
|
||||
|
||||
#### REPORTING BUGS ####
|
||||
|
||||
Please report any problems or suggestions by opening an issue at:
|
||||
https://github.com/ksh93/ksh
|
||||
Alternatively, email martijn@inlv.org (timely response *not* promised).
|
||||
|
||||
Good luck!!
|
||||
|
||||
The ksh 93u+m contributors
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
This file is of historic interest. For recent changes in both ksh 93u+m and
|
||||
the accompanying libraries, see the file NEWS in the top-level directory.
|
||||
____
|
||||
|
||||
12-08-01 --- Release ksh93u+ ---
|
||||
12-08-01 A bug that ignored interrupts for some builtins (e.g. cmdtst::grep)
|
||||
that read from stdin has been fixed.
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
This file is of historic interest. For recent changes in both ksh 93u+m and
|
||||
the accompanying libraries, see the file NEWS in the top-level directory.
|
||||
____
|
||||
|
||||
This is a list of changes that have been made since the 11/16/88 version
|
||||
of ksh.
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
This file is of historic interest. For recent changes in both ksh 93u+m and
|
||||
the accompanying libraries, see the file NEWS in the top-level directory.
|
||||
____
|
||||
|
||||
This is a list of changes that have been made since the 12/28/93 version
|
||||
of ksh.
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
***********************************************************************/
|
||||
|
||||
#define SH_RELEASE_FORK "93u+m" /* only change if you develop a new ksh93 fork */
|
||||
#define SH_RELEASE_SVER "1.0.0-alpha" /* semantic version number: https://semver.org */
|
||||
#define SH_RELEASE_DATE "2021-05-07" /* must be in this format for $((.sh.version)) */
|
||||
#define SH_RELEASE_SVER "1.0.0-beta.1" /* semantic version number: https://semver.org */
|
||||
#define SH_RELEASE_DATE "2021-05-10" /* must be in this format for $((.sh.version)) */
|
||||
#define SH_RELEASE_CPYR "(c) 2020-2021 Contributors to ksh " SH_RELEASE_FORK
|
||||
|
||||
/* Scripts sometimes field-split ${.sh.version}, so don't change amount of whitespace. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue