Imported from ../bash-2.05b.tar.gz.
[platform/upstream/bash.git] / NEWS
diff --git a/NEWS b/NEWS
index eb22abe..b545eb6 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,484 @@
+This is a terse description of the new features added to bash-2.05b since
+the release of bash-2.05a.  As always, the manual page (doc/bash.1) is
+the place to look for complete descriptions.
+
+1.  New Features in Bash
+
+a.  If set, TMOUT is the default timeout for the `read' builtin.
+
+b.  `type' has two new options:  `-f' suppresses shell function lookup, and
+    `-P' forces a $PATH search.
+
+c.  New code to handle multibyte characters.
+
+d.  `select' was changed to be more ksh-compatible, in that the menu is
+    reprinted each time through the loop only if REPLY is set to NULL.
+    The previous behavior is available as a compile-time option.
+
+e.  `complete -d' and `complete -o dirnames' now force a slash to be
+    appended to names which are symlinks to directories.
+
+f.  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.
+
+g.  Added support for ksh93-like [:word:] character class in pattern matching.
+
+h.  The  $'...' quoting construct now expands \cX to Control-X.
+
+i.  A new \D{...} prompt expansion; passes the `...' to strftime and inserts
+    the result into the expanded prompt.
+
+j.  The shell now performs arithmetic in the largest integer size the
+    machine supports (intmax_t), instead of long.
+
+k.  If a numeric argument is supplied to one of the bash globbing completion
+    functions, a `*' is appended to the word before expansion is attempted.
+
+l.  The bash globbing completion functions now allow completions to be listed
+    with double tabs or if `show-all-if-ambiguous' is set.
+
+m.  New `-o nospace' option for `complete' and `compgen' builtins; suppresses
+    readline's appending a space to the completed word.
+
+n.  New `here-string' redirection operator:  <<< word.
+
+o.  When displaying variables, function attributes and definitions are shown
+    separately, allowing them to be re-used as input (attempting to re-use
+    the old output would result in syntax errors).
+
+p.  There is a new configuration option `--enable-mem-scramble', controls
+    bash malloc behavior of writing garbage characters into memory at
+    allocation and free time.
+
+q.  The `complete' and `compgen' builtins now have a new `-s/-A service'
+    option to complete on names from /etc/services.
+
+r.  `read' has a new `-u fd' option to read from a specified file descriptor.
+
+s.  Fix the completion code so that expansion errors in a directory name
+    don't cause a longjmp back to the command loop.
+
+t.  Fixed word completion inside command substitution to work a little more
+    intuitively.
+
+u.  The `printf' %q format specifier now uses $'...' quoting to print the
+    argument if it contains non-printing characters.
+
+v.  The `declare' and `typeset' builtins have a new `-t' option.  When applied
+    to functions, it causes the DEBUG trap to be inherited by the named
+    function.  Currently has no effect on variables.
+
+w.  The DEBUG trap is now run *before* simple commands, ((...)) commands,
+    [[...]] conditional commands, and for ((...)) loops.
+
+x.  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.
+
+y.  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.
+
+z.  New [n]<&word- and [n]>&word- redirections from ksh93 -- move fds (dup
+    and close).
+
+aa. There is a new `-l' invocation option, equivalent to `--login'.
+
+bb. The `hash' builtin has a new `-l' option to list contents in a reusable
+    format, and a `-d' option to remove a name from the hash table.
+
+cc. There is now support for placing the long help text into separate files 
+    installed into ${datadir}/bash.  Not enabled by default; can be turned  
+    on with `--enable-separate-helpfiles' option to configure.
+    
+dd. All builtins that take operands accept a `--' pseudo-option, except
+    `echo'.
+
+ee. 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.
+
+
+2.  New Features in Readline
+
+a.  Support for key `subsequences':  allows, e.g., ESC and ESC-a to both
+    be bound to readline functions.  Now the arrow keys may be used in vi
+    insert mode.
+
+b.  When listing completions, and the number of lines displayed is more than
+    the screen length, readline uses an internal pager to display the results.
+    This is controlled by the `page-completions' variable (default on).
+
+c.  New code to handle editing and displaying multibyte characters.
+
+d.  The behavior introduced in bash-2.05a of deciding whether or not to
+    append a slash to a completed name that is a symlink to a directory has
+    been made optional, controlled by the `mark-symlinked-directories'
+    variable (default is the 2.05a behavior).
+
+e.  The `insert-comment' command now acts as a toggle if given a numeric
+    argument:  if the first characters on the line don't specify a
+    comment, insert one; if they do, delete the comment text
+
+f.  New application-settable completion variable:
+    rl_completion_mark_symlink_dirs, allows an application's completion
+    function to temporarily override the user's preference for appending
+    slashes to names which are symlinks to directories.
+
+g.  New function available to application completion functions:
+    rl_completion_mode, to tell how the completion function was invoked
+    and decide which argument to supply to rl_complete_internal (to list
+    completions, etc.).
+
+h.  Readline now has an overwrite mode, toggled by the `overwrite-mode'
+    bindable command, which could be bound to `Insert'.
+
+i.  New application-settable completion variable:
+    rl_completion_suppress_append, inhibits appending of
+    rl_completion_append_character to completed words.
+
+j.  New key bindings when reading an incremental search string:  ^W yanks
+    the currently-matched word out of the current line into the search
+    string; ^Y yanks the rest of the current line into the search string,
+    DEL or ^H deletes characters from the search string.
+
+-------------------------------------------------------------------------------
+This is a terse description of the new features added to bash-2.05a since
+the release of bash-2.05.  As always, the manual page (doc/bash.1) is
+the place to look for complete descriptions.
+
+1.  New Features in Bash
+
+a.  Added support for DESTDIR installation root prefix, so you can do a
+    `make install DESTDIR=bash-root' and do easier binary packaging.
+
+b.  Added support for builtin printf "'" flag character as per latest POSIX
+    drafts.
+
+c.  Support for POSIX.2 printf(1) length specifiers `j', `t', and `z' (from
+    ISO C99).
+
+d.  New autoconf macro, RL_LIB_READLINE_VERSION, for use by other applications
+    (bash doesn't use very much of what it returns).
+
+e.  `set [-+]o nolog' is recognized as required by the latest POSIX drafts,
+    but ignored.
+
+f.  New read-only `shopt' option:  login_shell.  Set to non-zero value if the
+    shell is a login shell.
+
+g.  New `\A' prompt string escape sequence; expands to time in 24 HH:MM format.
+
+h.  New `-A group/-g' option to complete and compgen; does group name
+    completion.
+
+i.  New `-t' option to `hash' to list hash values for each filename argument.
+
+j.  New [-+]O invocation option to set and unset `shopt' options at startup.
+
+k.  configure's `--with-installed-readline' option now takes an optional
+    `=PATH' suffix to set the root of the tree where readline is installed
+    to PATH.
+
+l.  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.
+
+m.  `readonly', `export', and `declare' now print variables which have been
+    given attributes but not set by assigning a value as just a command and
+    a variable name (like `export foo') when listing, as the latest POSIX
+    drafts require.
+
+n.  `bashbug' now requires that the subject be changed from the default.
+
+o.  configure has a new `--enable-largefile' option, like other GNU utilities.
+
+p.  `for' loops now allow empty word lists after `in', like the latest POSIX
+    drafts require.
+
+q.  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'
+    
+r.  `ulimit' now prints the option letter associated with a particular
+    resource when printing more than one limit.
+
+s.  `ulimit' prints `hard' or `soft' when a value is not `unlimited' but is
+    one of RLIM_SAVED_MAX or RLIM_SAVED_CUR, respectively.
+
+t.  The `printf' builtin now handles the %a and %A conversions if they're
+    implemented by printf(3).
+
+u.  The `printf' builtin now handles the %F conversion (just about like %f).
+
+v.  The `printf' builtin now handles the %n conversion like printf(3).  The
+    corresponding argument is the name of a shell variable to which the
+    value is assigned.
+
+2.  New Features in Readline
+
+a.  Added extern declaration for rl_get_termcap to readline.h, making it a
+    public function (it was always there, just not in readline.h).
+
+b.  New #defines in readline.h:  RL_READLINE_VERSION, currently 0x0402,
+    RL_VERSION_MAJOR, currently 4, and RL_VERSION_MINOR, currently 2.
+
+c.  New readline variable:  rl_readline_version, mirrors RL_READLINE_VERSION.
+
+d.  New bindable boolean readline variable:  match-hidden-files.  Controls
+    completion of files beginning with a `.' (on Unix).  Enabled by default.
+
+e.  The history expansion code now allows any character to terminate a
+    `:first-' modifier, like csh.
+
+f.  New bindable variable `history-preserve-point'.  If set, the history
+    code attempts to place the user at the same location on each history
+    line retrived with previous-history or next-history.
+
+-------------------------------------------------------------------------------
+This is a terse description of the new features added to bash-2.05 since
+the release of bash-2.04.  As always, the manual page (doc/bash.1) is
+the place to look for complete descriptions.
+
+1.  New Features in Bash
+
+a.  Added a new `--init-file' invocation argument as a synonym for `--rcfile',
+    per the new GNU coding standards.
+
+b.  The /dev/tcp and /dev/udp redirections now accept service names as well as
+    port numbers.
+
+c.  `complete' and `compgen' now take a `-o value' option, which controls some
+    of the aspects of that compspec.  Valid values are:
+
+        default - perform bash default completion if programmable
+                  completion produces no matches
+        dirnames - perform directory name completion if programmable
+                   completion produces no matches
+        filenames - tell readline that the compspec produces filenames,
+                    so it can do things like append slashes to
+                    directory names and suppress trailing spaces
+
+d.  A new loadable builtin, realpath, which canonicalizes and expands symlinks
+    in pathname arguments.
+    
+e.  When `set' is called without options, it prints function defintions in a
+    way that allows them to be reused as input.  This affects `declare' and 
+    `declare -p' as well.  This only happens when the shell is not in POSIX
+    mode, since POSIX.2 forbids this behavior.
+
+f.  Bash-2.05 once again honors the current locale setting when processing
+    ranges within pattern matching bracket expressions (e.g., [A-Z]).
+
+2.  New Features in Readline
+
+a.  The blink timeout for paren matching is now settable by applications,
+    via the rl_set_paren_blink_timeout() function.
+
+b.  _rl_executing_macro has been renamed to rl_executing_macro, which means
+    it's now part of the public interface.
+
+c.  Readline has a new variable, rl_readline_state, which is a bitmap that
+    encapsulates the current state of the library; intended for use by
+    callbacks and hook functions.
+
+d.  New application-callable function rl_set_prompt(const char *prompt):
+    expands its prompt string argument and sets rl_prompt to the result.
+
+e.  New application-callable function rl_set_screen_size(int rows, int cols):
+    public method for applications to set readline's idea of the screen
+    dimensions.
+
+f.  New function, rl_get_screen_size (int *rows, int *columns), returns
+    readline's idea of the screen dimensions.
+
+g.  The timeout in rl_gather_tyi (readline keyboard input polling function)
+    is now settable via a function (rl_set_keyboard_input_timeout()).
+
+h.  Renamed the max_input_history variable to history_max_entries; the old
+    variable is maintained for backwards compatibility.
+
+i.  The list of characters that separate words for the history tokenizer is
+    now settable with a variable:  history_word_delimiters.  The default
+    value is as before.
+
+-------------------------------------------------------------------------------
+This is a terse description of the new features added to bash-2.04 since
+the release of bash-2.03.  As always, the manual page (doc/bash.1) is
+the place to look for complete descriptions.
+
+1.  New Features in Bash
+
+a.  The history builtin has a `-d offset' option to delete the history entry
+    at position `offset'.
+
+b.  The prompt expansion code has two new escape sequences: \j, the number of
+    active jobs; and \l, the basename of the shell's tty device name.
+
+c.  The `bind' builtin has a new `-x' option to bind key sequences to shell   
+    commands.
+
+d.  There is a new shell option, no_empty_command_completion, which, when
+    enabled, disables command completion when TAB is typed on an empty line.
+
+e.  The `help' builtin has a `-s' option to just print a builtin's usage
+    synopsis.
+
+f.  There are several new arithmetic operators:  id++, id-- (variable
+    post-increment/decrement), ++id, --id (variable pre-increment/decrement),
+    expr1 , expr2 (comma operator).
+
+g.  There is a new ksh-93 style arithmetic for command:
+        for ((expr1 ; expr2; expr3 )); do list; done
+
+h.  The `read' builtin has a number of new options:
+        -t timeout      only wait timeout seconds for input
+        -n nchars       only read nchars from input instead of a full line
+        -d delim        read until delim rather than newline
+        -s              don't echo input chars as they are read
+
+i.  The redirection code now handles several filenames specially:
+    /dev/fd/N, /dev/stdin, /dev/stdout, and /dev/stderr, whether or
+    not they are present in the file system.
+
+j.  The redirection code now recognizes pathnames of the form
+    /dev/tcp/host/port and /dev/udp/host/port, and tries to open a socket
+    of the appropriate type to the specified port on the specified host.
+
+k.  The ksh-93 ${!prefix*} expansion, which expands to the names of all
+    shell variables with prefix PREFIX, has been implemented.
+
+l.  There is a new dynamic variable, FUNCNAME, which expands to the name of
+    a currently-executing function.  Assignments to FUNCNAME have no effect.
+
+m.  The GROUPS variable is no longer readonly; assignments to it are silently
+    discarded.  This means it can be unset.
+
+n.  A new programmable completion facility, with two new builtin commands:
+    complete and compgen.
+
+o.  configure has a new option, `--enable-progcomp', to compile in the
+    programmable completion features (enabled by default).
+
+p.  `shopt' has a new option, `progcomp', to enable and disable programmable
+    completion at runtime.
+
+q.  Unsetting HOSTFILE now clears the list of hostnames used for completion.
+
+r.  configure has a new option, `--enable-bash-malloc', replacing the old
+    `--with-gnu-malloc' (which is still present for backwards compatibility).
+
+s.  There is a new manual page describing rbash, the restricted shell.
+
+t.  `bashbug' has new `--help' and `--version' options.
+
+u.  `shopt' has a new `xpg_echo' option, which controls the behavior of
+    `echo' with respect to backslash-escaped characters at runtime.
+
+v.  If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the
+    startup files, even if they are not interactive.
+
+w.  The LC_NUMERIC variable is now treated specially, and used to set the
+    LC_NUMERIC locale category for number formatting, e.g., when `printf'
+    displays floating-point numbers.
+
+2.  New features in Readline
+
+a.  Parentheses matching is now always compiled into readline, and enabled
+    or disabled when the value of the `blink-matching-paren' variable is
+    changed.
+
+b.  MS-DOS systems now use ~/_inputrc as the last-ditch inputrc filename.
+
+c.  MS-DOS systems now use ~/_history as the default history file.
+
+d.  history-search-{forward,backward} now leave the point at the end of the
+    line when the string to search for is empty, like
+    {reverse,forward}-search-history.
+
+e.  history-search-{forward,backward} now leave the last history line found
+    in the readline buffer if the second or subsequent search fails.
+
+f.  New function for use by applications:  rl_on_new_line_with_prompt, used
+    when an application displays the prompt itself before calling readline().
+
+g.  New variable for use by applications:  rl_already_prompted.  An application
+    that displays the prompt itself before calling readline() must set this to
+    a non-zero value.
+
+h.  A new variable, rl_gnu_readline_p, always 1.  The intent is that an
+    application can verify whether or not it is linked with the `real'
+    readline library or some substitute.
+
+-------------------------------------------------------------------------------
+This is a terse description of the new features added to bash-2.03 since
+the release of bash-2.02.  As always, the manual page (doc/bash.1) is
+the place to look for complete descriptions.
+
+1.  New Features in Bash
+
+a.  New `shopt' option, `restricted_shell', indicating whether or not the
+    shell was started in restricted mode, for use in startup files.
+
+b.  Filename generation is now performed on the words between ( and ) in
+    array assignments (which it probably should have done all along).
+
+c.  OLDPWD is now auto-exported, as POSIX.2 seems to require.
+
+d.  ENV and BASH_ENV are read-only variables in a restricted shell.
+
+e.  A change was made to the startup file code so that any shell begun with
+    the `--login' option, even non-interactive shells, will source the login
+    shell startup files.
+
+2.  New Features in Readline
+
+a.  Many changes to the signal handling:
+        o Readline now catches SIGQUIT and cleans up the tty before returning;
+        o A new variable, rl_catch_signals, is available to application writers 
+          to indicate to readline whether or not it should install its own
+          signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP,
+          SIGTTIN, and SIGTTOU;
+        o A new variable, rl_catch_sigwinch, is available to application
+          writers to indicate to readline whether or not it should install its
+          own signal handler for SIGWINCH, which will chain to the calling
+          applications's SIGWINCH handler, if one is installed;
+        o There is a new function, rl_free_line_state, for application signal
+          handlers to call to free up the state associated with the current
+          line after receiving a signal;
+        o There is a new function, rl_cleanup_after_signal, to clean up the
+          display and terminal state after receiving a signal;
+        o There is a new function, rl_reset_after_signal, to reinitialize the
+          terminal and display state after an application signal handler
+          returns and readline continues
+
+b.  There is a new function, rl_resize_terminal, to reset readline's idea of
+    the screen size after a SIGWINCH.
+
+c.  New public functions: rl_save_prompt and rl_restore_prompt.  These were
+    previously private functions with a `_' prefix.
+
+d.  New function hook: rl_pre_input_hook, called just before readline starts
+    reading input, after initialization.
+
+e.  New function hook: rl_display_matches_hook, called when readline would
+    display the list of completion matches.  The new function
+    rl_display_match_list is what readline uses internally, and is available
+    for use by application functions called via this hook.
+
+f.  New bindable function, delete-char-or-list, like tcsh.
+
+g.  A new variable, rl_erase_empty_line, which, if set by an application using
+    readline, will cause readline to erase, prompt and all, lines on which the
+    only thing typed was a newline.
+
+h.  New bindable variable: `isearch-terminators'.
+
+i.  New bindable function: `forward-backward-delete-char' (unbound by default).
+
+-------------------------------------------------------------------------------
 This is a terse description of the new features added to bash-2.02 since
 the release of bash-2.01.1.  As always, the manual page (doc/bash.1) is
 the place to look for complete descriptions.