mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Increase shcomp bytecode header version; doc updates
src/cmd/ksh93/include/version.h:
- Centrally define the 93u+m copyright (SH_RELEASE_CPYR) for adding
to the original AT&T copyright in 'ksh --man' and 'shcomp --man'.
- Centrally define the binary header version number for bytecode
generated by shcomp: SHCOMP_HDR_VERSION.
- Bump SHCOMP_HDR_VERSION from 3 to 4. Converting all the preset
aliases to builtin commands has caused new bytecode to be
incompatible with old ksh. (However, old bytecode runs fine on
93u+m, because shcomp pre-expands the preset aliases.)
src/cmd/ksh93/sh/shcomp.c:
- Instead of keeping its own version date (not changed since 2003),
use the same version string as ksh itself (SH_RELEASE).
- Use SH_RELEASE_CPYR for the extra 93u+m copyright string.
- Use SHCOMP_HDR_VERSION for the bytecode header.
src/cmd/ksh93/sh/parse.c: sh_parse():
- Use SHCOMP_HDR_VERSION for the bytecode version check.
src/cmd/ksh93/data/builtins.c: opt_ksh[]:
- Use SH_RELEASE_CPYR for the extra 93u+m copyright string.
src/cmd/ksh93/COMPATIBILITY:
- Mention that 93u+m shcomp bytecode won't run on older ksh.
- Document changes in printf %T (re: 9526b3fa).
src/cmd/ksh93/README:
- Mention that we run on UnixWare (with major regressions).
https://github.com/ksh93/ksh/pull/159#issuecomment-764667929
This commit is contained in:
parent
9f43f8d10b
commit
7fdeadd4f1
6 changed files with 40 additions and 16 deletions
|
|
@ -11,19 +11,22 @@ For more details, see the NEWS file and for complete details, see the git log.
|
|||
POSIX standard more closely. See the manual page for details. It is
|
||||
enabled by default if ksh is invoked as sh.
|
||||
|
||||
1. File name generation (a.k.a. pathname expansion, a.k.a. globbing) now
|
||||
1. Bytecode compiled by shcomp 93u+m will not run on older ksh versions.
|
||||
(However, bytecode compiled by older shcomp will run on ksh 93u+m.)
|
||||
|
||||
2. File name generation (a.k.a. pathname expansion, a.k.a. globbing) now
|
||||
never matches the special navigational names '.' (current directory)
|
||||
and '..' (parent directory). This change makes a pattern like .*
|
||||
useful; it now matches all hidden 'dotfiles' in the current directory.
|
||||
|
||||
2. The bash-style &>foo redirection operator (shorthand for >foo 2>&1) can
|
||||
3. The bash-style &>foo redirection operator (shorthand for >foo 2>&1) can
|
||||
now always be used if -o posix is off, and not only in profile scripts.
|
||||
|
||||
3. Most predefined aliases have been converted to regular built-in
|
||||
4. Most predefined aliases have been converted to regular built-in
|
||||
commands that work the same way. 'unalias' no longer removes these.
|
||||
To remove a built-in command, use 'builtin -d'. The 'history' and 'r'
|
||||
predefined aliases remain, but are now only set on interactive shells.
|
||||
There are some minor changes in behaviour in some former aliases:
|
||||
There are some minor changes in behavior in some former aliases:
|
||||
- 'redirect' now checks if all arguments are valid redirections
|
||||
before performing them. If an error occurs, it issues an error
|
||||
message instead of terminating the shell.
|
||||
|
|
@ -31,12 +34,12 @@ For more details, see the NEWS file and for complete details, see the git log.
|
|||
no parent shell to return to and the login session would freeze.
|
||||
- 'times' now gives high precision output in a POSIX compliant format.
|
||||
|
||||
4. 'command' no longer expands aliases in its first argument, as this is
|
||||
5. 'command' no longer expands aliases in its first argument, as this is
|
||||
no longer required after change 3 above. In the unlikely event that you
|
||||
still need this behavior, you can set:
|
||||
alias command='command '
|
||||
|
||||
5. The undocumented 'login' and 'newgrp' builtin commands have been
|
||||
6. The undocumented 'login' and 'newgrp' builtin commands have been
|
||||
removed. These 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
|
||||
|
|
@ -44,7 +47,7 @@ For more details, see the NEWS file and for complete details, see the git log.
|
|||
alias login='exec login'
|
||||
alias newgrp='exec newgrp'
|
||||
|
||||
6. 'case' no longer retries to match patterns as literal strings if they
|
||||
7. 'case' no longer retries to match patterns as literal strings if they
|
||||
fail to match as patterns. This undocumented behaviour broke validation
|
||||
use cases that are expected to work. For example:
|
||||
n='[0-9]'
|
||||
|
|
@ -58,17 +61,23 @@ For more details, see the NEWS file and for complete details, see the git log.
|
|||
echo "$n is a number or the number pattern" ;;
|
||||
esac
|
||||
|
||||
7. If 'set -u'/'set -o nounset' is active, then the shell now errors out
|
||||
8. If 'set -u'/'set -o nounset' is active, then the shell now errors out
|
||||
if a nonexistent positional parameter such as $1, $2, ... is accessed.
|
||||
(This does *not* apply to "$@" and "$*".)
|
||||
|
||||
8. If 'set -u'/'set -o nounset' is active, then the shell now errors out
|
||||
9. 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.
|
||||
|
||||
9. The 'print', 'printf' and 'echo' builtin commands now return a nonzero
|
||||
10. The 'print', 'printf' and 'echo' builtin commands now return a nonzero
|
||||
exit status if an input/output error occurs.
|
||||
|
||||
10. The 'typeset' builtin now properly detects and reports options that
|
||||
11. Four obsolete date format specifiers for 'printf %(format)T' were
|
||||
changed to make them compatible with modern date(1) commands:
|
||||
- %k and %l now return a blank-padded hour (24-hour and 12-hour clock).
|
||||
- %f now returns a date with the format '%Y.%m.%d-%H:%M:%S'.
|
||||
- %q now returns the quarter of the current year.
|
||||
|
||||
12. The 'typeset' builtin now properly detects and reports options that
|
||||
cannot be used together if they are given as part of the same command.
|
||||
|
||||
____________________________________________________________________________
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue