Changes that improve compatibility w/ the Sixth Edition Unix shell
are marked w/ a `C:' in the details below.
-------------------------------------------------------------------------------
[osh-041028]:
*.1:
* Fixed a few typos in osh.1 and sh6.1.
* Did a little fine tuning of osh.1 and sh6.1 to hopefully
eliminate some incomplete and/or unclear explanations.
* Did the same for both if.1 and goto.1.
osh and sh6:
* Fixed an annoying bug introduced in the previous release...
The way error messages were printed in error() was not accounting
for the fact that the standard error stream is quite often (if not
always) unbuffered by default. This could make some error messages
difficult to read when a pipeline was involved. A little example:
Before (unfixed):
% foo|bar|baz
foo: not foundbar: not foundbaz: not found
After (fixed):
% foo|bar|baz
foo: not found
bar: not found
baz: not found
-------------------------------------------------------------------------------
[osh-041018]:
This release includes sh6 in addition to osh, if, and goto.
Sh6 is simply osh without the enhancements. It is built from the
same sources as osh, but it is not built or installed by default.
Makefile:
* Added targets for sh6 so that it can optionally be built, tested,
and installed if desired.
osh and sh6:
* Split the code into modules.
This is primarily for developer sanity... ;)
The new files are osh.h, main.c, parse.c, and exec.c.
* If (geteuid() != getuid() || getegid() != getgid()) is true,
print a nice error message and exit with a status of 2.
* Strip all NUL characters from the shell's standard input as it is
being read into the command line buffer. Input to the shell is
expected to be text.
* Changed the way the shell handles non-seekable files.
This is for both initialization files (osh only) and command files.
Do not block on open(2); open it and determine if it is a regular
file (or seekable). If it is not a regular file or is not seekable,
exit with an error. If seekable, reset the file for blocking I/O
and continue as normal.
Note that you can still read commands from FIFOs if you want.
Instead of doing `osh myfifo', you can either do `osh <myfifo'
or `osh - my list of positional parameters <myfifo'.
* Changed the error handling to use stdarg(3).
This allows for more code consistency and makes it easier
to handle all errors with just one line of code.
osh only:
* Added another possible initialization file for osh: $HOME/.oshrc
Osh only attempts to execute commands from this file if it is an
interactive shell. In the case of a login shell, osh tries this
file only after it tries both /etc/osh.login and $HOME/.osh.login.
* Made osh less strict about errors in initialization files.
Previously, common shell-detected errors in any of the files
were generally treated in the same way as they would have been
treated in a command file (i.e., the error was fatal). Realizing
that this potentially caused difficulty and annoyance for the user,
I opted to change it so that these types of errors are handled as
they are when osh is interactive.
This should make it easier for the user to debug
initialization files if needed.
* Added a `source' special command.
It is functionally similar to the way this command works in csh(1).
See osh(1) for details.
if:
* Changed ARGMAX from 50 to 256.
* If (geteuid() != getuid() || getegid() != getgid()) is true,
print a nice error message and exit with a status of 2.
* Added a few new primaries: `-h', `-s', `-t', and `-x'
See if(1) for details.
goto:
* Changed the size of the label buffer from 128 to 1024.
* Do not require the `:' of a labelled line to appear in column 1.
Instead, allow the `:' to optionally be preceded by blanks so that
labelled lines can be indented in command files. See goto(1) for
more details if needed.
* Eliminated unnecessary calls to strcmp(3) whenever a possible label
cannot possibly match the label argument given on the command line.
* Give an error if any NUL character is encountered in the input.
* Give an error if a zero-length string is given as the label argument.
-------------------------------------------------------------------------------
[osh-040812]:
osh.c:
* Changed the way unused pipe descriptors are handled in the child
process after fork(). This fixes a bug where the pipe in a pipeline
such as `( cat /dev/zero ) | sleep 1' would never enter an EOF state.
Previously, the close-on-exec flag was being set for the descriptors
in question. Of course, this did not work for the above and similar
cases. So, the descriptors in question are now close()d explicitly.
* Made some final changes to globbing to allow for more sensible
behaviour WRT quoting. The functions affected are: globargs(),
globchar(), and striparg(). Read and/or run `tests/glob_test.osh'
for details of the user-visible changes. This script may cause
previous versions of the shell to dump core.
Basically, since striparg() had always been called *after* glob(3)
and since the path names generated by glob(3) cannot be trusted, it
ends up that the best course of action is to call striparg() *before*
glob(3). This relatively simple change fixes a variety of *possible*
problems related to globbing.
-------------------------------------------------------------------------------
[osh-040731]:
osh.c:
* Added bounds checking to striparg() to protect against a possible
buffer overflow. Though this is unlikely to happen in the general
case, it is certainly *not* impossible. This function had been
unprotected since at least osh-020214.
* Added a new diagnostic, `Arg too long', to go with the
above-mentioned change.
* Removed the `No directory' diagnostic from globargs().
It was simply not worth the trouble. In compatible mode,
the `No match' diagnostic provides sufficient compatibility
in my opinion...
* Changed the `chdir' command so that it only attempts to change to
the previous working directory when the `-' argument is *not* quoted.
This alows the shell to change to a directory by that name.
For example:
% mkdir -; chdir -; pwd; chdir \-; pwd; chdir -; pwd; rmdir -
chdir: no old directory
/home/jneitzel/osh_stuff/osh-040731
/home/jneitzel/osh_stuff/osh-040731/-
/home/jneitzel/osh_stuff/osh-040731
Remember that "-" or '-' has the same effect as the \- used above.
This is perhaps a little silly, but I figure if a directory *can*
exist then it should be possible to change to it.
* Fixed the `<-' redirection argument so that it adheres to the
documentation. This fixes a file descriptor leak in addition
to the incorrect behaviour. It should be silently ignored in
the following case: `echo hello | grep h <-'; now it is.
-------------------------------------------------------------------------------
[osh-040723]:
osh.c:
C: Fixed a small idiosyncrasy with the `No directory' and `No match'
diagnostics when running in compatible mode. For example:
Before:
% if -d . -a -r . echo "`.' is a readable directory.";\
echo foo*; echo ?; echo []
`.' is a readable directory.
No match
No match
No directory
After:
% if -d . -a -r . echo "`.' is a readable directory.";\
echo foo*; echo ?; echo []
`.' is a readable directory.
No match
No match
No match
The shell should only print `No directory' when a directory
does not exist (ENOENT) or cannot be read (EACCES). Yes, it is
expected that invalid patterns such as `[' and `[]' result in
the shell printing a `No match' diagnostic.
* Changed the `<--' input redirection argument to `<-' instead.
This seems more consistent and will allow for possibly clearer
documentation in the future (if and when I add another feature
I've been thinking about).
fd2.[1c]:
* Removed the fd2 utility and its manual page because of
possible licensing issues.
-------------------------------------------------------------------------------
[osh-040718]:
This release is made primarily to synchronize with the new branch
of the shell which is named `sh6'.
osh.1:
* More revisions and clarifications...
-------------------------------------------------------------------------------
[osh-040714]:
Makefile:
* Refined the description for _XOPEN_SOURCE a little.
osh.1:
* General improvements...
This includes documenting some things that have never been very well
documented in this shell.
osh.c:
C: Made changes to globbing which affect the shell in compatible mode.
This includes the addition of the `No directory' diagnostic which
was present in /etc/glob from Sixth Edition Unix. Also, it looks
like I had previously misinterpreted exactly when the `No match'
diagnostic was supposed to be printed. Now, when running in
compatible mode the shell really is compatible. Yay =)
* Added a `umask' special command.
* Disallow SIGCHLD from being trapped.
When this signal is requested in a `trap' command, it is quietly
disallowed. This is the same behaviour seen with both SIGKILL and
SIGSTOP. Thus, doing a `trap + 9 17 20' quietly has no effect.
* Made changes to how the shell builds a command's argument vector.
Previously, malloc(3) was used. Now, each command in the command
line is simply split into `\0'-terminated words. Each argument is
actually a pointer to the corresponding word in the command line.
The changes to parameter substitution in osh-040628 made this
a perfectly sensible course of action. This change also gives
a microscopic improvement in run-time performance (as judged
by time(1)).
The only remaining use of malloc(3) in the shell's execution stage
can be found in globargs().
-------------------------------------------------------------------------------
[osh-040628]:
Thanks to Stephen M. Jones for suggesting that osh should be able
to read a global rc file. Thanks to Stephen C. VanDahm for assisting
with some portability issues found in osh-040421. Thanks also to
Josep Portella Florit for reviewing osh-040421, making several useful
suggestions, and sending patches.
BTW, many changes were made to the manual pages.
I hope they are clear, but I trust that if they are not then someone
might be kind enough to tell me so and/or make suggestions.
Some new files are included:
examples/*: initialization file examples
fd2.[1c]: the fd2 utility
Makefile:
* Added some notes about _XOPEN_SOURCE.
* Added a target to optionally build and install fd2.
* Removed the compile-time definition of `CLONE'.
This is now a run-time option which can be toggled in order to
enable or disable enhancements to the shell.
osh.c:
C: Changed how the shell does parameter substitution.
This was the last major incompatibility w/ the Thompson shell.
Now, substitution is done *before* any command-line parsing
takes place.
* Added the ability for login shells to read the initialization files
/etc/osh.login and/or $HOME/.osh.login if they exist. A shell is
considered to be a login shell if its first argument starts w/ a
`-' character (e.g., -osh).
* Added a `set' command to allow shell compatibility to be toggled
at run time. In addition, the shell now checks for `OSH_COMPAT'
in the environment to tell future invocations of the shell which
mode the user wishes to run in.
* In addition to the `set' command mentioned above, the following
special built-in commands have been added and are available when
the shell is in "noclone" mode:
exec, setenv, trap, unsetenv
* In globargs(), use `gl_pathc == 0' to detect an unmatched pattern
instead of checking if glob(3) returned `GLOB_NOMATCH'. This allows
for those cases where glob(3) may not be POSIX-compliant.
* Made osh command files that are run asynchronously ignore interrupts.
For example, `osh runcom&' should ignore SIGINT and SIGQUIT, and now
it does.
* Reverted a so-called compatibility fix made in osh-040421.
Now, ignore SIGINT and SIGQUIT for asynchronous commands invoked
from a command file. From a usability perspective, it is simply
too annoying to not do it this way.
* Changed the `exit' command so that it always terminates a shell when
reading commands from a file. Previously, it only terminated a shell
when invoked as `osh file'. Note that `exit' still has no effect for
interactive shells or `osh -c command'; this is intentional as it is
compatible w/ the behaviour of `exit' under the Thompson shell.
if.c:
* Include stdlib.h for exit(3) so that OS X doesn't complain.
* Rename exp() to expr() to avoid conflicts w/ exp(3) on OS X.
Strange, as math.h is not included there should not have been
any conflict. Oh well, it is fixed now.
* Enable this utility to return a meaningful exit status to the user.
In short, `if foo = foo' returns an exit status of 0; `if foo = bar'
returns an exit status of 1. Previously, exit status was always 0.
* Made the usage less ambiguous; corrected the documentation to reflect
the actual behaviour. In short, usage is (and always has been) as
follows:
if expr [command [arg ...]]
* Added some useful conditional primaries for constructing expressions.
See the manual pages for details.
* Use the stdio(3) functions instead of write(2) for printing
the error messages.
* In addition, added some useful diagnostic messages which were
inspired by the test(1) utility from Seventh Edition Unix.
goto.c:
* Give an error message when standard input is not seekable.
Previously, a label not found error would be produced instead.
fd2.c:
* A new utility and manual page... It is an adaptation of the PWB/Unix
(roughly PWB/1.0 ?) redirect diagnostic output command. The original
source came from the file `spencer_pwb.tar.gz' which can be found at:
http://www.tuhs.org/Archive/PDP-11/Distributions/usdl/
in the process. (More information on tech-pkg.)
Bump PKGREVISION and BUILDLINK_DEPENDS of all packages using libtool and
installing .la files.
Bump PKGREVISION (only) of all packages depending directly on the above
via a buildlink3 include.
patch provided by pancake at phreaker.net in PR 26777
changes (from Debian changelog):
posh (0.3.9) unstable; urgency=medium
* trap builtin now errors when no signals are specified.
closes: #265103.
* Move trap-related regression tests to their own file,
and add one to check for error on "trap 0".
posh (0.3.8) unstable; urgency=high
* Fix tilde expansion thinko introduced in 0.3.4.
posh (0.3.7) unstable; urgency=low
* Remove some cruft left around from ksh functions.
posh (0.3.6) unstable; urgency=low
* Add a better regression test for umask.
* Drop support of ksh88 ":[#%]+"-type trimming.
* Adjust regression tests to make sure ${blah:#blah} gives
an error.
posh (0.3.5) unstable; urgency=low
* Clean unused variables left after 0.3.4.
* Add prebuild target to debian/rules.
* Drop qsort altogether.
posh (0.3.4) unstable; urgency=low
* Fix most of the signedness comparison warnings.
* Remove homedir caching code.
* Switch specials, keywords, aliases, builtins, vars, and funs hashes
to use libc tsearch() and friends.
* Remove old table hash routines.
posh (0.3.3) unstable; urgency=low
* Rename custom table functions to prevent conflicts with
b-tree functions when search.h is included.
* Remove vestigial tracked alias code.
posh (0.3.2) unstable; urgency=low
* Make getn() use strtol().
* Mark unused function parameters to avoid gcc warnings.
posh (0.3.1) unstable; urgency=low
* Use libc's instead of internal qsort.
* Add -W to CFLAGS.
which are the full option names used to set rpath directives for the
linker and the compiler, respectively. In places were we are invoking
the linker, use "${LINKER_RPATH_FLAG} <path>", where the space is
inserted in case the flag is a word, e.g. -rpath. The default values
of *_RPATH_FLAG are set by the compiler/*.mk files, depending on the
compiler that you use. They may be overridden on a ${OPSYS}-specific
basis by setting _OPSYS_LINKER_RPATH_FLAG and _OPSYS_COMPILER_RPATH_FLAG,
respectively. Garbage-collect _OPSYS_RPATH_NAME and _COMPILER_LD_FLAG.
into the bsd.options.mk framework. Instead of appending to
${PKG_OPTIONS_VAR}, it appends to PKG_DEFAULT_OPTIONS. This causes
the default options to be the union of PKG_DEFAULT_OPTIONS and any
old USE_* and FOO_USE_* settings.
This fixes PR pkg/26590.
1.) Only create a dynamically linked "zsh" binary if "MKDYNAMICROOT"
is defined and set to "yes". This way people who still use statically
linked binaries on their root filesystem will get a static binary.
2.) Link the "zsh" binary so that it use "/libexec/ld.elf_so" and
shared libraries from "/lib". It now works without the "/usr"
filesystem being mounted.
dynamic library support on the root partition (e.g. 2.0 and newer). It is
enough that the "zsh" binary does *not* depend on its own shared libraries
which won't be on the root partition and we get a shell with proper I18N
support this way. Approved by Masao Uebayashi.
Changes since zsh version 4.2.0
-------------------------------
- The autoload and related builtins take options -k and -z to indicate
ksh or zsh autoloading style for given functions, making it possible
to mix and match.
- Assignments to associative arrays can use the i and r index flags.
For example,
assoc[(i)alpha*]=bravo
sets the value for the element whose key matches the pattern `alpha*';
assoc[(r)activ*]=passive
sets the value for the element whose current value matches the pattern
`activ*'.
- The glob qualifier F indicates a non-empty directory. Hence *(F)
indicates all subdirectories with entries, *(/^F) means all
subdirectories with no entries.
- fc -p and fc -P provide push/pop for the status of the shell's
history (both internal and using the history file). With automatic
scoping (fc -ap) it becomes easy to use a temporary history in a
function. This has been added to the calculator function zcalc to make
its internal history work more seamlessly.
- A new `try block' and `always block' syntax has been introduced
to make it easier to ensure the shell runs important tidy-up code
in the event of an error. It also runs after a break, continue, or
return, including a return forced by the ERR_RETURN option
(but not an exit, which is immediate). The syntax is:
`{' try-block-list `}' `always' `{' always-block-list `}'
where no newline or semicolon may appear between `}' and `always'.
This is compatible with all previous valid zsh syntax as an `always'
at that point used to be a syntax error. For example,
{ echo Code run in current shell } always { echo Tidy-up code }
- A new zle widget reset-prompt has been added to re-expand the current
prompt. Changes to the variable in use as well as changes in its
expanions are both taken into account. The same effect is now forced by
a job change notification, making the %j prompt escape and %(j..) ternary
expression more useful.
- The zftp module supports ports following the hostname in the normal suffix
notation, `host:port'. This requires IPv6 colon-style addresses to be
specified in suitably quoted square brackets, for example:
zftp open '[f000::baaa]'
zftp open '[f000::baaa]:ftp'
(the two are equivalent).
- Special traps, those that don't correspond to signals, i.e. ZERR, DEBUG
and EXIT are no longer executed inside other traps. This caused
unnecessary confusion if, for example, both DEBUG and EXIT traps
were set. The new behaviour is more compatible with other shells.
- New option TRAPS_ASYNC which if set allows traps to run while the
shell is waiting for a child process. This is the traditional zsh
behaviour; POSIX requires the option to be unset. In sh/ksh
compatibility mode the option is turned off by default and the option
letter -T turns it on, for compatibility with FreeBSD sh.
previous patches disabled it on NetBSD unconditionally. Bump PKGREVISION.
Pointed out by Kibum Han. Thanks to junyoung@ for testing.
OK'ed by schmonz@ and wiz@.
minor changes by me.
XSH is a fast and powerful command-line XML editor. It may be used to
query and modify XML documents. XSH may be used either interactivelly or
for off-line processing (like bash). XPath expressions are used to
select parts of XML document to be processed.
Both system shell and perl are accessible from XSH in a very natural
way. XSH itself is written in Perl and uses XML::LibXML bindings of
gnome-xml2 library in the background level.
36. V6.13.00 - 20040519
35. V6.12.03 - 20040322
34. turn on kanji and dspmbyte by default; add check for utf8 locales,
and turn parsing of that automatically based on $LANG.
33. Fix compilation issue under Windows/NT and charset incorrect patch
(Yoshiyuki Sakakibara)
32. completion additions (Tom Warzeka)
31. compilation fix (Martin Kraemer)
30. V6.12.02 - 20040221
29. Glob completion listing addition (Tom Warzeka)
28. BS2000 bs2cmd builtin. (Martin Kraemer)
27. Fix interrupt resetting code when /etc startup scripts have syntax errors
(Mark A. Grondona)
26. Clarification of kill-ring commands (Per Hedeland)
25. Debian completion additions (Martin Godisch)
24. Japanese character set fixes (Juehiro-san) from debian
23. NLS charset fixes; disabled since they only work with gnu gencat
(Martin Godisch)
22. Fix HPUX >= 11 resource (Jack Cummings)
21. Handle breaksw that jumps out of loops.
20. Revert #16. It causes worse problems.
19. Avoid using execl() because the last NULL does not always promoted to
a pointer because the function is variadic (Harti Brandt)
18. revert ignoreeof to the 6.11.00 behavior and document it (Martin Godisch)
17. do a case insensitive comparison for the multibyte vars (Martin Godisch)
16. don't sigsuspend() for an already exited job
15. glob all arguments in source (Martin Godisch)
14. various debian fixes (Martin Godisch)
13. setenv syntax check revert (Satoshi I. Nozawa)
12. EAGAIN typo (dan harkless)
11. filec compilation issue on hpux (beebe)
10. win32 compilation fixes for O_LARGEFILE (amol)
9. Don't go into an infinite loop when tcgetpgrp() returns an error.
8. Cygwin fixes (Corinna Vinschen)
7. NLS catclose() bug avoidance (KAJIMOTO Masato)
6. V6.12.01 - 20030208
5. Misc NT cleanup. No more GPL code (amol)
4. use strtol() to detect errors in builtin kill (Peter Jeremy)
3. Recognize linux systems on mips* (Maciej W. Rozycki)
2. Enable complete=igncase on unix (Stephen Krauth)
1. Eliminate maxitems (Todd Miller)
This closes PR pkg/25314.
Changes:
* Made various changes to hopefully improve the clarity.
Added COMPATIBILITY, HISTORY, and NOTES sections.
* Made changes to how the shell handles terminating `\' characters
w/ the `-c' and `-t' flags. This is a simple extension of the
same behaviour exhibited when the shell is interactive or when it
executes a command file, the only difference being that where a
terminating `\' character causes the shell to read the next line
of input in an interactive shell or command file, w/ the `-c' and
`-t' flags the shell terminates w/o executing the command line.
* Allow parameter substitution w/ the `-c' and `-t' flags. This
feature is not documented. For example, invoking the shell as
follows allows parameter substitution to take place:
% osh -t one two three
echo $0 $1 $2 $3
-t one two three
* The shell now ignores SIGINT and SIGQUIT when the `-c' or `-t' flag
is used. Thus, asynchronous commands invoked in this way ignore
interrupts as they should.
* Ignore SIGINT and SIGQUIT for all commands started from asynchronous
subshells. For example, `( sleep 300; some_command ) >outfile&' now
ignores `^C' and `^\' as it should.
* Don't ignore SIGINT and SIGQUIT for asynchronous commands started
in command files. If a command file is terminated by one of these
signals, the asynchronous commands should also terminate.
* Reverted a change made to termination reporting in osh-040216 that
was not actually compatible w/ the V6 shell.
* Always terminate the shell when read(2) fails.
This fixes a possible infinite loop.
* Fixed a bug in the parser that caused syntactically incorrect
subshell commands not to be detected as such when preceded by
redirection arguments (e.g., `<infile >outfile ( | )').
This bug was introduced in osh-040216.
* Fixed possible buffer overflows in substparm(); added a new error
message, "Too many characters", and made other changes necessary to
properly deal w/ the new error condition. This problem had been
present since at least osh-020214.
* Made some changes to how globbing is handled by the shell.
Specifically, glob(3) should only be called when an argument contains
unquoted occurrences of any of the glob characters `*', `?', or `['.
Previously, it was being called for every argument of an external
command. This change improves run-time performance slightly as
judged by time(1) and information returned by getrusage(2).
* The above-mentioned change also allows the following compatibility
feature. Added globbing compatibility when the shell is compiled
w/ -DCLONE so that when no matches are found a diagnostic,
"No match", is printed.
Patch provided by Geoff C. Wing in PR 24918
ok'd by uebayasi@
New features between zsh versions 4.0 and 4.2
Configuration:
* upgraded to use autoconf post-2.50
* improved compatibility with other shells through shell options, builtin
arguments and improved builtin option parsing
Syntax and builtins:
* new printf builtin
* `+=' to append to parameters which works for scalars, arrays and (with
pairs) associative arrays.
* enhanced multiple parameter `for' loops: for key value in key1 value1 key2
value2 ... maintaining full compatibility with POSIX syntax.
* Suffix aliases allow the shell to run a command on a file by suffix, e.g
`alias -s ps=gv' makes `foo.ps' execute `gv foo.ps'. Supplied function
zsh-mime-setup uses existing mailcap and mime.types files to set up suitable
aliases. Supplied function pick-web-browser is suitable for finding a browser
to show .html etc. files by suffix alias.
* new option `no_case_glob' for case-insensitive globbing.
Add-on modules and functions:
* zsh/datetime modules makes date formatting and seconds since EPOCH available
inside the shell.
* zsh/net/tcp module provides builtin interface to TCP through ztcp builtin.
Function suite for interactive and script use with expect-style pattern
matching.
* zsh/net/socket module provides zsocket builtin.
* zcalc calculator function with full line editing.
* builtin interface to pcre library
* zsh/zselect module provides zselect builtin as interface to select system call
Completion system:
* general improvements to command and context support, low-level functions,
display code.
* in verbose mode, matches with the same description are grouped
* highly configurable completions for values of specific parameters, specific
redirections for specific commands
* support for bash completion functions (typically zsh native functions are more
powerful where available)
* New completions provided for (some of these may be in later 4.0 releases):
valgrind, tidy, texinfo, infocmp, Java classes, larch, limit, locale
parameters, netcat, mysqldiff, mt, lsof, elinks, ant, debchange (dch), email
addresses, file system types, Perforce, xsltproc. Plus many others.
Line editor:
* special parameters $PREDISPLAY, $POSTDISPLAY available in function widgets
to configure uneditable text (for narrowing)
* recursive editing
* supplied widgets read-from-minibuffer, replace-string use these features
(more intuitive prompting and argument reading than 4.0)
* access to killed text via $CUTBUFFER and $killring
* supplied highly configurable word widgets forward-word-match etc., can set
what constitutes a word interactively or in startup script (implement
bash-style behaviour, replacing previous bash-* word widgets)
* interface to incremental search via $LASTSEARCH
* better handling of keymaps in zle and widgets
* better support for output from user-defined widgets while zle is active
* tetris game which runs entirely in zle
* several other contributed widgets
Local internal improvements:
* disowned jobs are automatically restarted
* \u and \U print escapes for Unicode
* read -d allows a custom line ending.
* read -t .
* line numbers in error messages and $PS4 output are more consistent
* `=prog' expands only paths, no longer aliases for consistency
* job display in prompts; `jobs' command output can be piped
* prompts: new $RPROMPT2, %^, %j, %y, enhanced %{, %}, %_.
* rand48() function in zsh/mathfunc for better randomness in arithmetic
(if the corresponding math library function is present)
* $SECONDS parameter can be made floating point via `typeset -F SECONDS'
for better timing accuracy
* improvements to command line history mechanism
* job table is dynamically sized, preventing overflow (typically seen
previously in complex completions).
* many bugfixes
presence of some strings to decide how to build zsh. This is, of course,
a stupid thing to do, but we must not override config.status to "fix"
this build. This fixes PR 24483.
explicitly calls config.status to generate some Makefiles in certain
directories. This particular package has a need for executing the real
config.status, so we need to avoid overriding it automatically.
Nologinmsg is a slightly more functional replacement for /sbin/nologin.
It adds per-user messages, and group messages (of a form).
From the FreeBSD ports collection.
PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from: FreeBSD ports collection
MFC after:
Changes since 20030621:
* A bug in which could cause memory corruption when a posix
function invoked another one has been fixed.
* A bug in which a file descriptor>2 could be closed before
executing a script has been fixed.
* A parsing error for <() and >() process subsitituions inside
command substitution has been fixed.
* A parsing error for patterns of the form {...}(...) when
used inside ${...} has been fixed.
* An error in which expanding an indexed array inside a compound
variable could cause a core dump has been fixed.
* A bug in which under on rare ocassions a job completion interrupt
could cause to core dump has been fixed.
* A bug in which process substitution embeded within command
substitution would generate a syntax error has been fixed.
This update does also fix the build problems on NetBSD-current reported
by Steven M. Bellovin in PR pkg/22422.
Use INSTALL_TARGET to install info files: this gives a proper
environment for USE_NEW_TEXINFO framework to work.
Fix makeinfo invocation for zsh-current via patch file so that
only _one_ info file is generated as PLIST seems to want it.
Changes since 20030422 (from the release notes):
A source and binary update. There are few small but significant patches
for ksh and nmake. nmake -l/+l library list generation is much improved.
IBM z-series { linux.s390, linux.s390-64 } and i-series { linux.ppc64 }
binary architectures have been added, and the ebcdic { mvs.390 } has
been updated after a long absence.
[bash205b-005]
When in a locale with multibyte characters, the readline display updater
will occasionally cause a segmentation fault when attempting to compute
the length of the first multibyte character on the line.
[bash205b-006]
When running in a locale with multibyte characters, the readline display
updater will use carriage returns when drawing the line, overwriting any
partial output already on the screen and not terminated by a newline.
[bash205b-007]
Using the vi editing mode's case-changing commands in a locale with
multibyte characters will cause garbage characters to be inserted into
the editing buffer.
Besides, export Bash's "test" target to Pkgsrc. Type "make test" to try
this.
XXX The MAINTAINER should be taken by someone really using this.
This is a development version of Zsh having more features than 4.0.x releases.
New features between zsh versions 4.0 and 4.1.1
-----------------------------------------------
Configuration:
- upgraded to use autoconf post-2.50
- improved compatibility with other shells through shell options,
builtin arguments and improved builtin option parsing
Syntax and builtins:
- new printf builtin
- `+=' to append to parameters which works for scalars, arrays and (with
pairs) associative arrays.
- enhanced multiple parameter `for' loops:
for key value in key1 value1 key2 value2 ...
maintaining full compatibility with POSIX syntax
Add-on modules and functions:
- zsh/net/tcp module provides builtin interface to TCP through ztcp
builtin. Function suite for interactive and script use with expect-style
pattern matching.
- zsh/net/socket module provides zsocket builtin.
- zcalc calculator function with full line editing.
- builtin interface to pcre library
- zsh/zselect module provides zselect builtin as interface to select
system call
Completion system:
- general improvements to command and context support, low-level functions,
display code.
- in verbose mode, matches with the same description are grouped
- highly configurable completions for values of specific parameters,
specific redirections for specific commands
- support for bash completion functions (typically zsh native functions are
more powerful where available)
- New completions provided for (some of these may be in later 4.0
releases): valgrind, tidy, texinfo, infocmp, Java classes, larch, limit,
locale parameters, netcat, mysqldiff, mt, lsof, elinks, ant, debchange
(dch), email addresses, file system types, Perforce, xsltproc.
Line editor:
- special parameters $PREDISPLAY, $POSTDISPLAY available in function
widgets to configure uneditable text (for narrowing)
- recursive editing
- supplied widgets read-from-minibuffer, replace-string use these features
(more intuitive prompting and argument reading than 4.0)
- access to killed text via $CUTBUFFER and $killring
- supplied highly configurable word widgets forward-word-match etc., can
set what constitutes a word interactively or in startup script
(implement bash-style behaviour, replacing previous bash-* word widgets)
- interface to incremental search via $LASTSEARCH
- better handling of keymaps in zle and widgets
- better support for output from user-defined widgets while zle is active
- tetris game which runs entirely in zle
Local internal improvements:
- disowned jobs are automatically restarted
- \u and \U print escapes for Unicode
- line numbers in error messages and $PS4 output are more consistent
- `=prog' expands only paths, no longer aliases for consistency
- job display in prompts; `jobs' command output can be piped
- prompts: new $RPROMPT2, %^, %j, %y, enhanced %{, %}, %_.
- rand48() function for better randomness in arithmetic
(if the corresponding math library function is present)
- $SECONDS parameter can be made floating point via `typeset -F SECONDS'
for better timing accuracy
- improvements to command line history mechanism
- many bugfixes
Bug fix release for stable version as well as a few completion
improvements. Also includes more current MASTER_SITES.
PR21938 by Geoff Wing <gcw at primenet dot com dot au>.
Tested on 1.6R (i386).
Changes:
03-03-18 --- Release ksh93o ---
03-03-18 A -N unary operator was added to test and [[...]] which returns
true if the file exists and the file has been modified since it
was last read.
03-03-18 The TIMEFORMAT variable was added to control the format for
the time compound command. The formatting description is
described in the man page.
03-03-06 A -N n option was added to read which causes exactly n bytes
to be read unlike -n n which causes at most n bytes to be read.
03-03-03 Three new shell variables were added. The variable .sh.file
stores the full pathname of the file that the current command
was found in. The variable .sh.fun names the current function
that is running. The variable .sh.subshell contains the depth
of the current subshell or command substitution.
03-03-03 When the DEBUG trap is executed, the current command line after
expansions is placed in the variable .sh.command. The trap
is also now triggered before each iteration of a for, select,
and case command and before each assignment and redirection.
03-02-28 Function definitions are no longer stored in the history file so
that set -o nolog no longer has any meaning.
03-02-28 All function definitions can be displayed with typeset -f not
just those stored in the history file. In addition, typeset +f
displays the function name followed by a comment containg the
line number and the path name for the file that defined this function.
03-02-28 A bug in which the value of $LINENO was not correct when executing
command contained inside mult-line command substitutions has been
fixed.
03-02-19 Since some existing ksh88 scripts use the undocumented and
unintended ability to insert a : in front of the % and # parameter
expansion operators, ksh93 was modified to accept :% as equivalent
to % and :# as equivalent to # with ${name op word}.
03-02-14 A bug which could cause a core dump when reading from standard
error when standard error was a pty has been fixed.
03-02-14 The shell arithmetic was modified to use long double on systems
that provide this data type.
03-02-09 A bug in which a function located in the first directory in FPATH
would not be found when the last component of PATH was . and the
current directory was one of the directories in PATH has been fixed.
03-02-07 The trap and kill builtin commands now accept a leading SIG prefix
on the signal names as documented.
03-02-05 A bug in the expansion of ${var/$pattern}, when pattern contained
\[ has been fixed.
03-02-05 A bug in which .sh.match[n], n>0, was not being set for substring
matches with % and %% has been fixed.
03-01-15 A bug in which getopts did not work for numerical arguments specified
as n#var in the getopts string has been fixed.
03-01-09 A bug in which using ${.sh.match} multiple times could lead to
a memory exception has been fixed.
03-01-06 A bug in the expansion of ${var/pattern/$string} in the case that
$string contains \digit has been fixed.
03-01-02 A -P option was added for systems such as Solaris 8 that support
profile shell.
03-01-02 For backward compatibility with ksh88, arithmetic expansion
with ((...)) and let has been modified so that if x is a zero-filled
variable, $x will not be treated as an octal constant.
${LOCALBASE} - makes this package install successfully on systems where the
package tools may reside under ${LOCALBASE}.
On Solaris, don't set "-static" into LDFLAGS, so that the package builds
properly.
as devel/perlsh.
The Perl Shell is a shell that combines the interactive nature of a Unix
shell with the power of Perl. The goal is to eventually have a fully
featured shell that behaves as expected for normal shell activity.
The Perl Shell will use Perl syntax and functionality for control-flow
statements and other things.
Makefiles simply need to use this value often, for better or for
worse.
(2) Create a new variable FIX_RPATH that lists variables that should
be cleansed of -R or -rpath values if ${_USE_RPATH} is "no". By
default, FIX_RPATH contains LIBS, X11_LDFLAGS, and LDFLAGS, and
additional variables may be appended from package Makefiles.
have it be automatically included by bsd.pkg.mk if USE_PKGINSTALL is set
to "YES". This enforces the requirement that bsd.pkg.install.mk be
included at the end of a package Makefile. Idea suggested by Julio M.
Merino Vidal <jmmv at menta.net>.
Changes from 20020922 (other than bug fixes) are:
* The code to display compound objects was rewritten to make it easier
for runtime extensions to reuse this code.
* A change was made to allow runtime builtins to be notified when a
signal is received so that cleanup can be performed.
* User applications can now trap the ALRM signal. Previously, the ALRM
signal was used internally and could not be used by applications.
as this isn't really the real Korn shell, and "pdksh" is a more accurate
name for it. Also don't use buildlink2 so that this shell may be used to
bootstrap buildlink2.
PD-ksh is a mostly complete AT&T ksh look-alike. Work is mostly
finished to make it fully compatible with both POSIX and AT&T ksh
(when the two don't conflict). Since pdksh is free and compiles
and runs on most common unix systems, it is very useful in creating
a consistent user interface across multiple machines.
Here are some of them, excerpted from NEWS:
- New code to handle multibyte characters.
- `select' was changed to be more ksh-compatible
- There is now a bindable edit-and-execute-command readline command,
like the vi-mode `v' command, bound to C-xC-e in emacs mode.
- The shell now performs arithmetic in the largest integer size the
machine supports (intmax_t), instead of long.
- There is a new configuration option `--enable-mem-scramble', controls
bash malloc behavior of writing garbage characters into memory at
allocation and free time.
- The `complete' and `compgen' builtins now have a new `-s/-A service'
option to complete on names from /etc/services.
- `read' has a new `-u fd' option to read from a specified file descriptor.
- The expansion of $LINENO inside a shell function is only relative to the
function start if the shell is interactive -- if the shell is running a
script, $LINENO expands to the line number in the script. This is as
POSIX-2001 requires.
- The bash debugger in examples/bashdb has been modified to work with the
new DEBUG trap semantics, the command set has been made more gdb-like,
and the changes to $LINENO make debugging functions work better. Code
from Gary Vaughan.
- New [n]<&word- and [n]>&word- redirections from ksh93 -- move fds (dup
and close).
- The `echo' builtin now accepts \0xxx (zero to three octal digits following
the `0') in addition to \xxx (one to three octal digits) for SUSv3/XPG6/
POSIX.1-2001 compliance.
- Added support for DESTDIR installation root prefix, so you can do a
`make install DESTDIR=bash-root' and do easier binary packaging.
- New `-A group/-g' option to complete and compgen; does group name
completion.
- The ksh-like `ERR' trap has been added. The `ERR' trap will be run
whenever the shell would have exited if the -e option were enabled.
It is not inherited by shell functions.
- configure has a new `--enable-largefile' option, like other GNU utilities.
- `for' loops now allow empty word lists after `in', like the latest POSIX
drafts require.
- The builtin `ulimit' now takes two new non-numeric arguments: `hard',
meaning the current hard limit, and `soft', meaning the current soft
limit, in addition to `unlimited'
Also, there is a "New unwind-protect implementation from Paul
Eggert", which I believe obviates the need for two sparc64-related
patches.