Version 5.2.14pre * bug fixes * eval: if given empty command, exist status is that of last command substitution (if any). * trap: if first argument is "exit", it is taken as a command not a signal. * pwd: config test & code to work around bug in hpux 10.x getcwd(). * RANDOM: seed based on both time and pid; different sequence in sub shells. * typeset -f: now pretty-prints $(..) and $((..)) correctly. * fixed bug in memory allocation which can lead to core dumps. * set -o: no longer prints options that have no names. * emacs: . in very fist command no longer dumps core. * .: can now dot non-regular files (eg, /dev/null). * parsing: bar(); no longer dumps core when function bar is run. * variable substitution: ${#array[*]} now prints number of set elements in the array (used to print largest index, not what ksh88 did). * job control: resuming suspended gnu su no longer hoses su'd shell. * job control: fixed possible core dump when waiting for jobs. Version 5.2.13 * bug fixes * functions: $0 in sh-style functions is now the same as the shell's $0. * .: fixed possible core dump on clean up. * test: a lone -t argument now does a isatty(1) test if not in posix mode. * alias: PS2 no longer printed when expanding alias foo="cmd; ". * set/typeset/getopts: can have options prefixed with both + and -. * typeset -f: now reproduces functions correctly ("function F" vs "F()"). * alias: options can start with +. * set -A: a -- marking end of options is now skipped. * errexit option (-e) ignored when reading profile and $ENV files. * test: '-x f' now fails for root if f is a file and has no x bits set. * $_: set to last arg in interactive shells only. * PATH: if $PATH not set on startup, it is set to the default path. * extended globbing: allow (pat|pat) within @(...) and ${foo#...} patterns. * emacs: ^[_ now behaves as it does in at&t ksh (word from _last_ command). * MAIL/MAILCHECK: fixed bug that prevented the `new mail' messages. * ${..%..} and ${..#..} now work if compiled as sh. * sh: fd's greater than 2 are passed on to executed commands. * syntax: accepts "if (( 1 )) then" (also [[ ]]): no ; required before then. * substitution: accepts (and ignores) leading : in %, %%, #, ## substitions. * .: doting directories no longer allowed. * editing: completion after "cmd " now completes files (was command). $OpenBSD: NEWS,v 1.8 1999/01/08 20:24:56 millert Exp $ Version 5.2.12 * bug fixes * editing: shell recognizes window resizes on Dec alphas (config problem). * alias: no longer dumps core if alias is in a command substitution. * alias: everything after ;\n or \n\n was ignored in aliases. * exec: temp files used by here docs in functions now cleaned up on exec. * possible core dump when cleaning up environment fixed. * vi: set -o vi-show8 now does what it was supposed to do (cat -v like). * job control: process group synchronization (needed on systems with broken setpgrp()) now works when the pipeline contains built in commands. * vi: if set -o vi-tabcomplete, tab works in command mode as well. * set/typeset: unset parameters are only reported if they have attributes. Version 5.2.11 * bug fixes * aliases: expansion was reading an extra character (bug added in 5.2.10). Version 5.2.10 * bug fixes * parsing: handling of backslash-newline fixed (esp. in here documents). * read: prints prompt if non-interactive and input is a tty. Version 5.2.9 * bug fixes * config: using LDSTATIC no longer generates config error. * config: can compile as sh again (--enable-shell=sh). * config: should compile on machines with broken "gcc -g" * config: fixed test for broken S_IFIFO. * config: fixed test for getwd() routine. * config: better NeXT support (signal list generated correctly, clock_t type detected, enable job control in rlogin sessions) * parsing: assignments containing brackets ([]) not treated as commands. * editing: terminal column width determined correctly on startup. * vi: long prompts truncated (more or less) correctly. * file completion: files of the form ~user (no /'s) expanded correctly. * at&t ksh method for delimiting hidden characters in prompt added (i.e., start prompt with non-printing char and \r, use char to delimit esc codes). Version 5.2.8 * bug fixes * configuration: handle FreeBSD's strange S_ISSOCK. * test: added == operator. * configuration: fixed opendir/dirent usage. * redirections before subshells handled correctly. * COLUMNS/LINES are no longer exported when they are automatically set. * mail checks and PS1/PS4 expansions removed if compiled as sh. * subcommands in PS1 no longer generate bogus warning messages. * environment variables not longer messed up on 16-bit machines. * unset: now returns non-zero if variable/function isn't set. * select: only prints menu first time, if REPLY is null or on blank line. * check for `cannot execute' improved, error message says why. * typeset: now reports variables with attributes but now value. * vi/emacs file completion: does directory listing on zero length names. * arithmetic: non-numeric parameters expanded recursively. * arithmetic: identifiers in unevaluated part of ?:,&&,|| parsed correctly. * functions: unsetting a function within itself is now safe. * arrays: unsetting element 0 of an array no longer kills the whole array. * co-processes now behave like ksh93 co-processes (and less like ksh88). * functions declared with "function foo" are treated differently (from those declared with "foo()"): $0 is (not) set to the function name, assignments before function calls aren't (are) kept in the parent shell. * vi: added vi-esccomplete option for people who want ESC-ESC completion. * vi/emacs: now notice window size changes (but not while editing a line). * emacs: # now does the comment/uncomment thing. * arithmetic: ++, -- and , added. Version 5.2.7 * bug fixes * vi: commands can be longer that 16 chars... Version 5.2.6 * bug fixes * break/continue: if too big a number is given, last enclosing loop is used. * set: set +o now generates a set command that can be saved and executed. * COLUMNS/LINES are now exported when they are automatically set. * emacs: completion: space not added after directory names. * vi: # command inserts # after each newline; # on commented line undoes the commenting. * some regression tests made less sensitive to their environment. * should compile on os/2 again. Version 5.2.5 * bug fixes * configuration: if sig_setjmp() being used, use sigjmp_buf. * configuration: test for times() fixed. * configuration: ANSI usage of setjmp() and offsetof(). * echo/print: octal number in \ sequence must start with a 0. * echo: don't treat a lone minus as an option. * typeset -f: correctly prints functions with select statements. * vi: / with no pattern repeats last search. * vi: repeat counts no longer effect file completion/expansion. * vi: tab-completion now also works in command mode. * emacs/vi: ^O key now read as ^O on suns/alphas (was eaten by tty driver). * emacs: now has file expansion (^[*). * emacs: ^O goes to next command, not next next command. * COLUMNS/LINES: environment variables now set on start up. * variables: command line assignments can't change readonly variables. * arithmetic: giving multiple bases (5#4#3) no longer allowed. * arithmetic: when assigning a non-integer variables, base no longer shown. * history: fixed replacement bug introduced in last release. * history: -1 refers to the previous command, not current fc command. * parsing: correctly handles command substitutions starting with a newline. * full command completion added (both vi and emacs). Version 5.2.4 * bug fixes * PS1 imported from environment again. * vi handles prompts with embedded newlines. * errors redirecting stderr aren't lost. * redirection errors for <&n no longer reported as to >&n. * don't do globbing on re-direction targets if not interactive (POSIX). * pattern matching in [[ foo = foo*bar ]] now works again. * HUP signals are passed on to jobs running in the foreground. * $? now valid (ie, not 0) in trap handlers, `...` expressions, etc. * noclobber doesn't effect redirections to non-regular files (eg, /dev/null) * \newline in here-document delimiters handled correctly. * typeset -f now reports unloaded autoload functions properly. * ~,~+,~- are not expanded if HOME,PWD,OLDPWD are unset. * vi completion/expansion: * not appeded if word contains $. * cd: error message contains correct directory string. * vi expansion list: printed in column form ala at&t ksh. * ^C while reading .profile/$ENV nolonger causes shell to exit. * option errors for build-in commands now include command name. * emacs completion/expansion: ' and " are treated as word delimiters. * fc: replacements (a=b) no longer truncates the command. * alias: alias -t -r now cleans out the tracked alias table. * compile-time configuration changed: configure script --enable-XXX options replace the old options.h file. Use "configure --help" for information on what the options do (they are basicly the same as what was in the options.h file). Shell can be configured as a (almost) plain bourne shell using the --enable-shell=sh (also generates appropriate man page). Installed name of program (ksh or sh) can be modified using configure's --program-* options. * ulimit: added -p (maxproc) option. * case statements can use the old syntax of {,} instead of in,esac. * extended file globbing added (eg, f*(bar|Bar) matches f, fbar fBarbar, etc). * trim expressions can be of the form ${parameter#pattern1|pattern2|...}. * if compiled as sh, $ENV included only if posix option is set. * vi: U command added (undo all changes on line). * the Bugs script has been replaced by a new regression testing system, kept in the tests/ directory (contains a perl script which sets up a test environment and runs tests, and a bunch of tests). Version 5.2.3 * bug fixes * arrays: set -A and unset now unset whole array. * history(complex version): fixed core caused by uninitialized hist_source. * getopts: will continue parsing options if called after error. * getopts: doesn't print shell name twice in error message. * posix: if posix option is set, $0 is always the name of the shell. * history: "fc -s foo" now finds foo if it is the most recent command. * let: expression errors no longer cause scripts to exit. * PS1: does not go into infinite loop if there is an expansion error. * configure: memmove/bcopy test has a change of working now. * configure: check for flock(), undefine COMPLEX_HISTORY if not found. * substitution: tilde substitution works in word part of ${var[-+=?]word}. * history: "fc " now edits , not to most recent. * cd: two argument form works again. * special commands taking assignments (alias,set,etc.): field splitting, file globbing, etc. suppressed only for args that look like assignments. * command: -V now finds reserved words. * added support for Korn's /dev/fd tests * new compile time option: DEFAULT_ENV - if defined, it names a file to include if $ENV is not set. * test -o option: if option starts with a !, the test is negated. The test always fails if the option doesn't exist (so [ -o foo -o -o !foo ] is true iff option foo exists). * new option: set -o nohup (currently on by default) - if set, running jobs are not kill -HUP'd when a login shell exits; if clear, they are. In future, this will be clear by default (to act like at&t ksh) - if you don't (won't) like this, add "[ -o !nohup ] && set -o nohup" to your .profile. Version 5.2.2 * bug fixes * included c_test.h in distribution (opps). Version 5.2.1 * bug fixes * emacs: buffer no longer overflowed when completing file names/commands. * emacs: now bound to delete-back-word (was ...-char). * emacs: ignores a space char after ^V (version), as in at&t ksh. * emacs: ^O bound to newline-and-next, ^X^Y bound to list-file. * emacs: emacs words now include underscore. * vi: set -o markdirs, directories and ^[= now get along. * cd: -P no longer leaves .. and . in PWD. * cd: if CDPATH set and can't cd, error doesn't contain any of CDPATH. * cd: sets PWD properly, on machines without getwd(). * configuration: unistd.h test fixed (include sys/types before dirent.h). * configuration: detects memmove/bcopy's that don't handle overlaps. * [[ ... ]] does lazy evaluation (eg, [[ ! -f foo || $(\) no longer rings bell on ambiguous matches. * vi: globbing doesn't append * if last component of file has globbing chars. * emacs: most commands now take arguments, arguments can be multi digit. * emacs: newline-and-next command works more correctly. * after set -u, trimming substitutions no longer automatically fail. * set -i no longer reports an internal error. * FPATH: no longer incorrectly complains about function not being defined. by a file; when it connectly complains, shell name in error is correct. * set -a; set -o allexport: these now do something. * shell deals with non-blocking input (clears non-blocking flag). * autoconf: fixed memmove/memcpy tests. * ! translation in prompt now done before parameter substitution. * siglist.sh works around bug in bash 1.4.3. * correct positional parameters accessible in local assignments. * (sleep 100&) no longer waits for sleep to complete. * fc -s option added (same as -e -). * vi: ^V command (version) added. * vi: @ macros added (@X executes vi commands in alias _X). * emacs: bind -l lists all command names. * emacs: goto-history command added. * emacs: search-char function changed to search-char-forward; added search-char-backward (bound to ^]). * cd and pwd take -L and -P options; added set -o physical option (PWD,OLDPWD no longer readonly). * new command line -l option tells shell it is a login session. * os2 changes completed. * uses autoconf 2.x (was using 1.x). Version 5.1.3 * bug fixes * fixed bug in arithmetic expression evaluation (||,&& caused core dump). * ulimit code now uses rlim_t or quad_t, if appropriate. * vi: file completion in command mode of single character filename works. * vi: file completion with markdirs set resulted in two trailing /'s. * vi: completion/expansion/listing acts like at&t ksh when expand fails. * vi: ~ takes count. * lines from history file are no longer negative (easy history). * Makefile now uses manual extension consistently. * fc now allows out of range relative (negative) numbers. * functions with elif now printed correctly. * FPATH now searched if PATH search fails, as in at&t ksh. * typeset -f output is readable (and more correct) * compiles under SCO unix * more os/2 changes integrated Version 5.1.2 * bug fixes * for i; do ...; done now accepted. * leading non-white-space IFS chars no longer ignored (now delimit fields). * fixed globbing code so echo /usr/*/make works. Version 5.1.1 * bug fixes * { ..;} allowed instead of do ..;done in for/select loops * EOF after ; or & no longer causes syntax error * complex history: when shrinking history file, keeps inside buffer space. * vi editing: `v' on modified line no longer changes command numbering. * ^C in vi/emacs no longer prints two newlines. * long arguments (> 255) with globbing characters don't cause core dumps. * new (un)option, KSH, which compiles out ksh code (for producing minimal sh). * os/2 changes partly merged. Version 5.1.0 * bug fixes * problem caused by _POSIX_VDISABLE on BSDI machines fixed * exit status set to 127 if command file could not be opened * profile files processed if basename argv[0] starts with (was $0) * PWD now imported properly from environment. * emacs code now either uses dynamic buffers or does overflow checking. * emacs forward-word and delete-forward-word now work like other emacs's. * ^C/^\ in vi/emacs work like at&t ksh (prompt reprinted, even if trapped). * history number to command mapping now constant (numbers used to change). * configuration: BSD tty now used on ultrix (avoids type ahead problem) * eof in the middle of multiline commands now ignored if ignoreeof set. * vi space command now works again. * pointer mismatch compiler warning for waitpid() call dealt with. * emacs internal memory error in command completion fixed. * autoloaded functions now work first try. * SECONDS parameter now acts like in at&t ksh. * sense of vi-show8 option changed: 8-bit characters are printed as is by default; turning on vi-show8 now causes chars with 8th bit set to be prefixed with M-. * missing sections in man page added (now basicly complete) * emacs ^V command added: prints ksh version * vi g command added: moves to most recent history Version 5.0.10 * bug fixes * [[ ]] construct unbroken. * the newline after a here document marker is now read properly. * blank lines no longer cause $? to be set to 0. * mail checking now uses atime/mtime instead of size. * changing attributes of exported parameters no longer causes core dump. * the last command in a file does not have to end in a newline. * empty expressions now treated as 0 (previously generated an error). * nul bytes stripped from input. * 0241 (M-!) in a command substitution no longer lost. * when read used in startup file, line continuation no longer causes crash. * very long commands in history no longer cause vi to overwrite memory. * easy history: when saving history, avoid going past the end of history. * emacs mode no longer entered if EDITOR/VISUAL set to null string. * command -p disabled in restricted mode. * closed file descriptors are re-closed after a redirection. * lone [ (test command) no longer causes globbing code to search directory. * if TIMES_BROKEN is defined, ksh_times no longer recurses infinitely. * `r r' no longer repeats r command forever. * make depend no longer generates backslash followed by a blank line. * globbing code now deals with symlinks that point to non-existent files. * if the ] is missing in a pattern, the [ matches the [ character. * syntax errors in test no longer have two newlines. * in vi, G now goes to the oldest history (was newest). * configuration: test for sys_siglist now harder for optimizers to break. * configuration: look for clock_t in sys/times.h. * configuration: use _SIGMAX, if available, for # of signals. * SIGHUP now causes builtin read command to exit. * wait builtin now returns whenever a traped signal occurs as per POSIX. * v command now works in vi; anchored searches now work in vi mode (/^ptrn); multi-line commands displayed correctly by history. * echo is now schizophrenic: accepts -n/-e/-E and backslash sequences. * test -H file added (checks for context dependent files on HPs). * set -o gmacs and markdirs honoured. * ansi arrow keys in default emacs key bindings. * ulimit now takes arithmetic expression (as per Korn book). * co-processes changed to be more compatible with at&t ksh. Version 5.0.9 * bug fixes * FOO is put in the environment for FOO=bar exec blah. * compiles under QNX and with dmake. * the file pattern [!a--]* is now invalid (POSIX) (used to match everything) * echo "${foo:-"a"}*" no longer the same as echo a*. * alternation (brace expansion) fixes: * brace expansion done after variable expansion, as in csh/at&t ksh. * `echo a{b,c' no longer gives "Missing }" error (it echos a{b,c). * expansion only done if there is a comma (ie, `echo {a}' prints {a}). * globbing/expansion code passes 0x80 unharmed. * "echo ${XX=a*b}" no longer sets XX to "a\200*b". * "echo ${unset-a*b}" no longer has \200 in the error message. * bad substitution error generated for things like ${x:a}, ${x^a}, etc. * `x="a cdef"; echo ${x#a c}' now prints "def" instead of "a a cdef". * on systems where /etc/passwd//// is a valid name, echo /etc/pass*/ no longer matches /etc/passwd. * trace output (set -x) flushed correctly, PS4 initialized. * ulimit output ungarbled, code to use {set,get}ulimit (if available) enabled. * tilde expansion done in word part of ${foo-~/bar} * when reading stdin (ie, ksh -s), no longer reads too much. * shell handles i/o redirection and errors in builtin commands as per POSIX (still have to sort out variable assignment errors). * starting jobs that save/change/restore tty settings in the background no longer messes up tty settings when job finishes. * the pattern [a'-'z] now matches three characters, not 26, and the pattern [ab']'] also matches three characters. * a mostly complete man page! (work is still in progress) * quoting inside $(..) mostly works. * error reporting has been orthogonalized. * brace expansion on by default (can be disabled with set +o braceexpand, or set -o posix). * output of "set -o" now fits on a normal screen. * co-processes added (|&, read -p, print -p, etc.). * restricted mode added (for what its worth). * vi now prints meta characters with M- prefix, unless vi-show8 option is on. Version 5.0.8 * bug fixes * two problems in fc (introduced in 5.0.7) * install target in Makefile missing a dollar Version 5.0.7 * POSIX command command added * a few bug fixes * now compiles with various options undefined (eg, VI, EMACS, JOBS). * fixed typos in Makefile.in (maxext -> manext) and ksh.1 (\f -> \fP). * CLK_TCK defined to correct value for FreeBSD 1.1.5 (and earlier?). * original process group restored when an exec is done. * the exit value of set is that of the last $(...) on the command line. * ditto for a command with no command (eg, x=`false`). * command variable assignments done before path search (so PATH=... x works) and are added as they are processed (so A=1 B=$A works). * variable assignments infront of function calls are exported to programs inside the function. * aliases with trailing space are only honoured in command contexts if in posix mode. * make depend target added; install target warns if ksh not in /etc/shells. * set -o bgnice now does something. * vi mode: ESC is no longer a file completion command (too annoying). Version 5.0.6 * most reported bugs/problems fixed (all but two). * temporary files now created in $TMPDIR (if it is a sane path). Version 5.0.5 * function parsing POSIXized (function bodies can be any compound command, redirections after functions effect function invocation, not the instantiation, the () in a function definition now parsed as two tokens). * exit bultin now does stopped jobs check. * set -p/-o priviliged supported. * test builtin now believed to be completely posix. * a default path is now used when PATH is not set (defined in options.h). Version 5.0.4 * configuration checks for buggy opendir()s and setpgrp()s. * autoloading functions now supported. * functions can safely redefine themselves. Version 5.0.3 * hash command changed to "alias -t"; whence -p added; print -s added (all as in at&t ksh); unalias -a added (POSIX). * test builtin POSIX complient * TMOUT parameter supported (at&t ksh: timeout interactive shells) Version 5.0.2 * trap/error handling changed to eliminate longjmp()s from signal handlers; trap ERR added. * ksh conditional expressions ([[ .. ]]) supported. * arithmetic expressions (let, $((..)), etc.) now understand full C integer expressions (except ++/-- and sizeof()). * typeset -L -R -Z -u -l added (as in at&t ksh) * at&t/posix $(( .. )) arithmetic expansions supported. Version 5.0.1 * set -e no longer effects commands executed as part of if/while/until/&&/||/! condition. * posix ! keyword now recognized. * posix getopts; if not in posix mode, getopts will accept options starting with + (at&t kshism) * syntax error messages improved (says what was unexpected/unmatched) Version 4.9+mun.5 * all known bugs related to job control fixed: * fg,bg,jobs,wait,kill commands fully POSIX complient * signals are no longer reported for foreground jobs killed by SIGINT and SIGPIPE * pipeline process groups now created more reliablely (was a problem if first process exited before second process exec'd). * "(: ; cat /etc/termcap) | sleep" nolonger hangs * save/restore tty mode if command succeeds/fails, respectively. Edit mode (emacs,vi) no longer use old tty mode information * test command: added -h * alternations option renamed to braceexpand (eg, use set -o braceexpand). Old usage (set -o alternations) still accepted (will disappear in next version). * trap/kill now accept upper and lower case signal names. Version 4.9+mun.3 * here documents in functions now work properly * read command: added -s option, use REPLY if no variable specified * don't accept "while command; done" as a valid command * fg,bg,jobs,wait,kill commands mostly POSIX complient. * unset command: added POSIX -v option * set command: added -A option * handle ${array[@]} and ${array[*]} * compiles with old bsd 4.2 compiler (pcc) * new versions of etc/profile and etc/ksh.profile Version 4.9+mun.2 (versus 4.9) * directory/file structure has been re-arranged: * moved files from sh directory up a level, deleted sh directory * created misc directory, old ChangeLog,README,.. files moved to misc * now uses GNU autoconf for compilation. * no longer uses stdio FILE *'s for I/O redirection (most stdio usage has been removed). Solves many porting problems caused by dup'd file descriptors, forked processes and exiting. * removed lint from code (compiles with very few warning with gcc -O -Wall -Wno-comment) * has array support (needs work but is pretty functional). * ulimit command now more functional on more machines. Compatable with at&t ksh. * command line and set option parsing cleaned up, POSIXized. * POSIX IFS handling. * many many small bug fixes (see ChangeLog)