mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-29 08:29:54 +02:00
commit bash-20061012 snapshot
This commit is contained in:
@@ -13728,3 +13728,31 @@ builtins/read.def
|
||||
9/21
|
||||
----
|
||||
[bash-3.2 frozen]
|
||||
|
||||
10/9
|
||||
----
|
||||
support/shobj-coonf
|
||||
- change -fpic to -fPIC for FreeBSD systems (needed for SPARC at least)
|
||||
|
||||
10/11
|
||||
-----
|
||||
[bash-3.2 released]
|
||||
|
||||
10/12
|
||||
-----
|
||||
parse.y
|
||||
- change parse_matched_pair to make sure `` command substitution does
|
||||
not check for shell comments while parsing. Bug reported against
|
||||
bash-3.2 by Greg Schaefer <gschafer@zip.com.au>
|
||||
|
||||
10/14
|
||||
-----
|
||||
parse.y
|
||||
- add new parser_state flag: PST_REGEXP; means we are parsing a
|
||||
regular expression following the =~ conditional operator
|
||||
- cond_node sets PST_REGEXP after reading the `=~' operator
|
||||
- change read_token to call read_token_word immediately if the
|
||||
PST_REGEXP bit is set in parser_state
|
||||
- change read_token_word to skip over `(' and `|' if PST_REGEXP is
|
||||
set, since those characters are legitimate regexp chars (but still
|
||||
parse matched pairs of parens)
|
||||
|
||||
+13746
File diff suppressed because it is too large
Load Diff
+11
-11
@@ -1,7 +1,7 @@
|
||||
@%:@! /bin/sh
|
||||
@%:@ From configure.in for Bash 3.2, version 3.190.
|
||||
@%:@ Guess values for system-dependent variables and create Makefiles.
|
||||
@%:@ Generated by GNU Autoconf 2.59 for bash 3.2-release.
|
||||
@%:@ Generated by GNU Autoconf 2.59 for bash 3.2-maint.
|
||||
@%:@
|
||||
@%:@ Report bugs to <bug-bash@gnu.org>.
|
||||
@%:@
|
||||
@@ -270,8 +270,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='bash'
|
||||
PACKAGE_TARNAME='bash'
|
||||
PACKAGE_VERSION='3.2-release'
|
||||
PACKAGE_STRING='bash 3.2-release'
|
||||
PACKAGE_VERSION='3.2-maint'
|
||||
PACKAGE_STRING='bash 3.2-maint'
|
||||
PACKAGE_BUGREPORT='bug-bash@gnu.org'
|
||||
|
||||
ac_unique_file="shell.h"
|
||||
@@ -785,7 +785,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures bash 3.2-release to adapt to many kinds of systems.
|
||||
\`configure' configures bash 3.2-maint to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -846,7 +846,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of bash 3.2-release:";;
|
||||
short | recursive ) echo "Configuration of bash 3.2-maint:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1039,7 +1039,7 @@ fi
|
||||
test -n "$ac_init_help" && exit 0
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
bash configure 3.2-release
|
||||
bash configure 3.2-maint
|
||||
generated by GNU Autoconf 2.59
|
||||
|
||||
Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
@@ -1053,7 +1053,7 @@ cat >&5 <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by bash $as_me 3.2-release, which was
|
||||
It was created by bash $as_me 3.2-maint, which was
|
||||
generated by GNU Autoconf 2.59. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -1422,10 +1422,10 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
|
||||
|
||||
|
||||
BASHVERS=3.2
|
||||
RELSTATUS=release
|
||||
RELSTATUS=maint
|
||||
|
||||
case "$RELSTATUS" in
|
||||
alp*|bet*|dev*|rc*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
|
||||
alp*|bet*|dev*|rc*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
|
||||
*) DEBUG= MALLOC_DEBUG= ;;
|
||||
esac
|
||||
|
||||
@@ -27791,7 +27791,7 @@ _ASBOX
|
||||
} >&5
|
||||
cat >&5 <<_CSEOF
|
||||
|
||||
This file was extended by bash $as_me 3.2-release, which was
|
||||
This file was extended by bash $as_me 3.2-maint, which was
|
||||
generated by GNU Autoconf 2.59. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -27854,7 +27854,7 @@ _ACEOF
|
||||
|
||||
cat >>$CONFIG_STATUS <<_ACEOF
|
||||
ac_cs_version="\\
|
||||
bash config.status 3.2-release
|
||||
bash config.status 3.2-maint
|
||||
configured by $0, generated by GNU Autoconf 2.59,
|
||||
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
||||
|
||||
+17
-17
@@ -17,19 +17,19 @@
|
||||
{
|
||||
'm4_pattern_forbid' => 1,
|
||||
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
||||
'AC_C_VOLATILE' => 1,
|
||||
'AC_TYPE_OFF_T' => 1,
|
||||
'AC_C_VOLATILE' => 1,
|
||||
'AC_FUNC_CLOSEDIR_VOID' => 1,
|
||||
'AC_REPLACE_FNMATCH' => 1,
|
||||
'AC_PROG_LIBTOOL' => 1,
|
||||
'AC_FUNC_STAT' => 1,
|
||||
'AC_HEADER_TIME' => 1,
|
||||
'AC_FUNC_WAIT3' => 1,
|
||||
'AC_FUNC_LSTAT' => 1,
|
||||
'AC_STRUCT_TM' => 1,
|
||||
'AC_HEADER_TIME' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'AC_TYPE_MODE_T' => 1,
|
||||
'AC_STRUCT_TM' => 1,
|
||||
'AC_FUNC_LSTAT' => 1,
|
||||
'AC_FUNC_GETMNTENT' => 1,
|
||||
'AC_TYPE_MODE_T' => 1,
|
||||
'AC_FUNC_STRTOD' => 1,
|
||||
'AC_CHECK_HEADERS' => 1,
|
||||
'AC_FUNC_STRNLEN' => 1,
|
||||
@@ -48,17 +48,17 @@
|
||||
'AC_STRUCT_ST_BLOCKS' => 1,
|
||||
'AC_TYPE_SIGNAL' => 1,
|
||||
'AC_TYPE_UID_T' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'AC_PROG_MAKE_SET' => 1,
|
||||
'sinclude' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'sinclude' => 1,
|
||||
'AC_DEFINE_TRACE_LITERAL' => 1,
|
||||
'AC_FUNC_STRERROR_R' => 1,
|
||||
'AC_PROG_CC' => 1,
|
||||
'AC_FUNC_FORK' => 1,
|
||||
'AC_DECL_SYS_SIGLIST' => 1,
|
||||
'AC_FUNC_VPRINTF' => 1,
|
||||
'AC_FUNC_FORK' => 1,
|
||||
'AC_FUNC_STRCOLL' => 1,
|
||||
'AC_FUNC_VPRINTF' => 1,
|
||||
'AC_PROG_YACC' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'AC_STRUCT_TIMEZONE' => 1,
|
||||
@@ -80,33 +80,33 @@
|
||||
'AM_MAINTAINER_MODE' => 1,
|
||||
'AC_FUNC_UTIME_NULL' => 1,
|
||||
'AC_FUNC_SELECT_ARGTYPES' => 1,
|
||||
'AC_FUNC_STRFTIME' => 1,
|
||||
'AC_HEADER_STAT' => 1,
|
||||
'AC_PROG_CPP' => 1,
|
||||
'AC_FUNC_STRFTIME' => 1,
|
||||
'AC_C_INLINE' => 1,
|
||||
'AC_TYPE_PID_T' => 1,
|
||||
'AC_PROG_LEX' => 1,
|
||||
'AC_PROG_CPP' => 1,
|
||||
'AC_C_CONST' => 1,
|
||||
'AC_PROG_LEX' => 1,
|
||||
'AC_TYPE_PID_T' => 1,
|
||||
'AC_CONFIG_FILES' => 1,
|
||||
'include' => 1,
|
||||
'AC_FUNC_SETVBUF_REVERSED' => 1,
|
||||
'AC_PROG_INSTALL' => 1,
|
||||
'AM_GNU_GETTEXT' => 1,
|
||||
'AC_CHECK_LIB' => 1,
|
||||
'AC_FUNC_OBSTACK' => 1,
|
||||
'AC_CHECK_LIB' => 1,
|
||||
'AC_FUNC_MALLOC' => 1,
|
||||
'AC_FUNC_GETGROUPS' => 1,
|
||||
'AC_FUNC_GETLOADAVG' => 1,
|
||||
'AH_OUTPUT' => 1,
|
||||
'AC_FUNC_FSEEKO' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'AC_FUNC_MKTIME' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AC_FUNC_MKTIME' => 1,
|
||||
'AC_CONFIG_HEADERS' => 1,
|
||||
'AC_HEADER_SYS_WAIT' => 1,
|
||||
'AC_FUNC_MEMCMP' => 1,
|
||||
'AC_PROG_LN_S' => 1,
|
||||
'AC_FUNC_MEMCMP' => 1,
|
||||
'm4_include' => 1,
|
||||
'AC_HEADER_DIRENT' => 1,
|
||||
'AC_CHECK_FUNCS' => 1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
m4trace:configure.in:30: -1- AC_INIT([bash], [3.2-release], [bug-bash@gnu.org])
|
||||
m4trace:configure.in:30: -1- AC_INIT([bash], [3.2-maint], [bug-bash@gnu.org])
|
||||
m4trace:configure.in:30: -1- m4_pattern_forbid([^_?A[CHUM]_])
|
||||
m4trace:configure.in:30: -1- m4_pattern_forbid([_AC_])
|
||||
m4trace:configure.in:30: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
# From configure.in for Bash 3.2, version 3.190.
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.59 for bash 3.2-release.
|
||||
# Generated by GNU Autoconf 2.59 for bash 3.2-maint.
|
||||
#
|
||||
# Report bugs to <bug-bash@gnu.org>.
|
||||
#
|
||||
@@ -270,8 +270,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='bash'
|
||||
PACKAGE_TARNAME='bash'
|
||||
PACKAGE_VERSION='3.2-release'
|
||||
PACKAGE_STRING='bash 3.2-release'
|
||||
PACKAGE_VERSION='3.2-maint'
|
||||
PACKAGE_STRING='bash 3.2-maint'
|
||||
PACKAGE_BUGREPORT='bug-bash@gnu.org'
|
||||
|
||||
ac_unique_file="shell.h"
|
||||
@@ -785,7 +785,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures bash 3.2-release to adapt to many kinds of systems.
|
||||
\`configure' configures bash 3.2-maint to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -846,7 +846,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of bash 3.2-release:";;
|
||||
short | recursive ) echo "Configuration of bash 3.2-maint:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1039,7 +1039,7 @@ fi
|
||||
test -n "$ac_init_help" && exit 0
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
bash configure 3.2-release
|
||||
bash configure 3.2-maint
|
||||
generated by GNU Autoconf 2.59
|
||||
|
||||
Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
@@ -1053,7 +1053,7 @@ cat >&5 <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by bash $as_me 3.2-release, which was
|
||||
It was created by bash $as_me 3.2-maint, which was
|
||||
generated by GNU Autoconf 2.59. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -1422,10 +1422,10 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
|
||||
|
||||
|
||||
BASHVERS=3.2
|
||||
RELSTATUS=release
|
||||
RELSTATUS=maint
|
||||
|
||||
case "$RELSTATUS" in
|
||||
alp*|bet*|dev*|rc*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
|
||||
alp*|bet*|dev*|rc*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
|
||||
*) DEBUG= MALLOC_DEBUG= ;;
|
||||
esac
|
||||
|
||||
@@ -27791,7 +27791,7 @@ _ASBOX
|
||||
} >&5
|
||||
cat >&5 <<_CSEOF
|
||||
|
||||
This file was extended by bash $as_me 3.2-release, which was
|
||||
This file was extended by bash $as_me 3.2-maint, which was
|
||||
generated by GNU Autoconf 2.59. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -27854,7 +27854,7 @@ _ACEOF
|
||||
|
||||
cat >>$CONFIG_STATUS <<_ACEOF
|
||||
ac_cs_version="\\
|
||||
bash config.status 3.2-release
|
||||
bash config.status 3.2-maint
|
||||
configured by $0, generated by GNU Autoconf 2.59,
|
||||
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
||||
|
||||
+2
-2
@@ -25,7 +25,7 @@ dnl Process this file with autoconf to produce a configure script.
|
||||
AC_REVISION([for Bash 3.2, version 3.190])dnl
|
||||
|
||||
define(bashvers, 3.2)
|
||||
define(relstatus, release)
|
||||
define(relstatus, maint)
|
||||
|
||||
AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org])
|
||||
|
||||
@@ -43,7 +43,7 @@ RELSTATUS=relstatus
|
||||
|
||||
dnl defaults for debug settings
|
||||
case "$RELSTATUS" in
|
||||
alp*|bet*|dev*|rc*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
|
||||
alp*|bet*|dev*|rc*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
|
||||
*) DEBUG= MALLOC_DEBUG= ;;
|
||||
esac
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
This is the Bash FAQ, version 3.33, for Bash version 3.1.
|
||||
This is the Bash FAQ, version 3.34, for Bash version 3.2.
|
||||
|
||||
This document contains a set of frequently-asked questions concerning
|
||||
Bash, the GNU Bourne-Again Shell. Bash is a freely-available command
|
||||
@@ -9,7 +9,7 @@ Another good source of basic information about shells is the collection
|
||||
of FAQ articles periodically posted to comp.unix.shell.
|
||||
|
||||
Questions and comments concerning this document should be sent to
|
||||
chet@po.cwru.edu.
|
||||
chet.ramey@case.edu.
|
||||
|
||||
This document is available for anonymous FTP with the URL
|
||||
|
||||
@@ -36,8 +36,8 @@ A10) What is the bash `posix mode'?
|
||||
|
||||
Section B: The latest version
|
||||
|
||||
B1) What's new in version 3.1?
|
||||
B2) Are there any user-visible incompatibilities between bash-3.1 and
|
||||
B1) What's new in version 3.2?
|
||||
B2) Are there any user-visible incompatibilities between bash-3.2 and
|
||||
bash-2.05b?
|
||||
|
||||
Section C: Differences from other Unix shells
|
||||
@@ -78,6 +78,7 @@ E10) Why does `cd //' leave $PWD as `//'?
|
||||
E11) If I resize my xterm while another program is running, why doesn't bash
|
||||
notice the change?
|
||||
E12) Why don't negative offsets in substring expansion work like I expect?
|
||||
E13) Why does filename completion misbehave if a colon appears in the filename?
|
||||
|
||||
Section F: Things to watch out for on certain Unix versions
|
||||
|
||||
@@ -140,26 +141,26 @@ of Case Western Reserve University.
|
||||
|
||||
A2) What's the latest version?
|
||||
|
||||
The latest version is 3.1, first made available on 09 December, 2005.
|
||||
The latest version is 3.2, first made available on 12 October, 2006.
|
||||
|
||||
A3) Where can I get it?
|
||||
|
||||
Bash is the GNU project's shell, and so is available from the
|
||||
master GNU archive site, ftp.gnu.org, and its mirrors. The
|
||||
latest version is also available for FTP from ftp.cwru.edu.
|
||||
The following URLs tell how to get version 3.1:
|
||||
The following URLs tell how to get version 3.2:
|
||||
|
||||
ftp://ftp.gnu.org/pub/gnu/bash/bash-3.1.tar.gz
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-3.1.tar.gz
|
||||
ftp://ftp.gnu.org/pub/gnu/bash/bash-3.2.tar.gz
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-3.2.tar.gz
|
||||
|
||||
Formatted versions of the documentation are available with the URLs:
|
||||
|
||||
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.1.tar.gz
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-doc-3.1.tar.gz
|
||||
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.2.tar.gz
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-doc-3.2.tar.gz
|
||||
|
||||
Any patches for the current version are available with the URL:
|
||||
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-3.1-patches/
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-3.2-patches/
|
||||
|
||||
A4) On what machines will bash run?
|
||||
|
||||
@@ -192,7 +193,7 @@ http://www.cygwin.com/.
|
||||
Cygnus originally ported bash-1.14.7, and that port was part of their
|
||||
early GNU-Win32 (the original name) releases. Cygnus has also done
|
||||
ports of bash-2.05b and bash-3.0 to the CYGWIN environment, and both
|
||||
are available as part of their current release. Bash-3.1 is currently
|
||||
are available as part of their current release. Bash-3.2 is currently
|
||||
being tested and should be available soon.
|
||||
|
||||
Bash-2.05b and later versions should require no local Cygnus changes to
|
||||
@@ -216,7 +217,7 @@ Mark began to work with bash-2.05, but I don't know the current status.
|
||||
|
||||
Bash-3.0 compiles and runs with no modifications under Microsoft's Services
|
||||
for Unix (SFU), once known as Interix. I do not anticipate any problems
|
||||
with building bash-3.1.
|
||||
with building bash-3.1 or bash-3.2.
|
||||
|
||||
A6) How can I build bash with gcc?
|
||||
|
||||
@@ -385,12 +386,22 @@ They are also listed in a section in the Bash Reference Manual
|
||||
|
||||
Section B: The latest version
|
||||
|
||||
B1) What's new in version 3.1?
|
||||
B1) What's new in version 3.2?
|
||||
|
||||
Bash-3.1 is the first maintenance release of the third major release of
|
||||
Bash-3.2 is the second maintenance release of the third major release of
|
||||
bash. It contains the following significant new features (see the manual
|
||||
page for complete descriptions and the CHANGES and NEWS files in the
|
||||
bash-3.1 distribution).
|
||||
bash-3.2 distribution).
|
||||
|
||||
o Bash-3.2 now checks shell scripts for NUL characters rather than non-printing
|
||||
characters when deciding whether or not a script is a binary file.
|
||||
|
||||
o Quoting the string argument to the [[ command's =~ (regexp) operator now
|
||||
forces string matching, as with the other pattern-matching operators.
|
||||
|
||||
A short feature history dating from Bash-2.0:
|
||||
|
||||
Bash-3.1 contained the following new features:
|
||||
|
||||
o Bash-3.1 may now be configured and built in a mode that enforces strict
|
||||
POSIX compliance.
|
||||
@@ -401,8 +412,6 @@ o The `+=' assignment operator, which appends to the value of a string or
|
||||
o It is now possible to ignore case when matching in contexts other than
|
||||
filename generation using the new `nocasematch' shell option.
|
||||
|
||||
A short feature history dating from Bash-2.0:
|
||||
|
||||
Bash-3.0 contained the following new features:
|
||||
|
||||
o Features to support the bash debugger have been implemented, and there
|
||||
@@ -640,10 +649,10 @@ grammar tighter and smaller (66 reduce-reduce conflicts gone)
|
||||
lots of code now smaller and faster
|
||||
test suite greatly expanded
|
||||
|
||||
B2) Are there any user-visible incompatibilities between bash-3.1 and
|
||||
B2) Are there any user-visible incompatibilities between bash-3.2 and
|
||||
bash-2.05b?
|
||||
|
||||
There are a few incompatibilities between version 2.05b and version 3.1.
|
||||
There are a few incompatibilities between version 2.05b and version 3.2.
|
||||
They are detailed in the file COMPAT in the bash distribution. That file
|
||||
is not meant to be all-encompassing; send mail to bash-maintainers@gnu.org
|
||||
if if you find something that's not mentioned there.
|
||||
@@ -837,7 +846,7 @@ Implementation differences:
|
||||
|
||||
C3) Which new features in ksh-93 are not in bash, and which are?
|
||||
|
||||
New things in ksh-93 not in bash-3.0:
|
||||
New things in ksh-93 not in bash-3.2:
|
||||
associative arrays
|
||||
floating point arithmetic and variables
|
||||
math library functions
|
||||
@@ -863,7 +872,7 @@ New things in ksh-93 not in bash-3.0:
|
||||
lexical scoping for local variables in `ksh' functions
|
||||
no scoping for local variables in `POSIX' functions
|
||||
|
||||
New things in ksh-93 present in bash-3.0:
|
||||
New things in ksh-93 present in bash-3.2:
|
||||
[n]<&word- and [n]>&word- redirections (combination dup and close)
|
||||
for (( expr1; expr2; expr3 )) ; do list; done - arithmetic for command
|
||||
?:, ++, --, `expr1 , expr2' arithmetic operators
|
||||
@@ -1113,7 +1122,7 @@ will try to write on a pipe without a reader. In that case, bash
|
||||
will print `Broken pipe' to stderr when ps is killed by a
|
||||
SIGPIPE.
|
||||
|
||||
As of bash-3.1, bash will not report SIGPIPE errors by default. You
|
||||
As of bash-3.1, bash does not report SIGPIPE errors by default. You
|
||||
can build a version of bash that will report such errors.
|
||||
|
||||
E3) When I have terminal escape sequences in my prompt, why does bash
|
||||
@@ -1390,6 +1399,32 @@ expanded value of param is unset or null, and $param otherwise.
|
||||
To use negative offsets that begin with a minus sign, separate the
|
||||
minus sign and the colon with a space.
|
||||
|
||||
E13) Why does filename completion misbehave if a colon appears in the filename?
|
||||
|
||||
Filename completion (and word completion in general) may appear to behave
|
||||
improperly if there is a colon in the word to be completed.
|
||||
|
||||
The colon is special to readline's word completion code: it is one of the
|
||||
characters that breaks words for the completer. Readline uses these characters
|
||||
in sort of the same way that bash uses $IFS: they break or separate the words
|
||||
the completion code hands to the application-specific or default word
|
||||
completion functions. The original intent was to make it easy to edit
|
||||
colon-separated lists (such as $PATH in bash) in various applications using
|
||||
readline for input.
|
||||
|
||||
This is complicated by the fact that some versions of the popular
|
||||
`bash-completion' programmable completion package have problems with the
|
||||
default completion behavior in the presence of colons.
|
||||
|
||||
The current set of completion word break characters is available in bash as
|
||||
the value of the COMP_WORDBREAKS variable. Removing `:' from that value is
|
||||
enough to make the colon not special to completion:
|
||||
|
||||
COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
|
||||
|
||||
You can also quote the colon with a backslash to achieve the same result
|
||||
temporarily.
|
||||
|
||||
Section F: Things to watch out for on certain Unix versions
|
||||
|
||||
F1) Why can't I use command line editing in my `cmdtool'?
|
||||
@@ -1795,9 +1830,9 @@ Some of the new ksh93 pattern matching operators, like backreferencing
|
||||
|
||||
H5) When will the next release appear?
|
||||
|
||||
The next version will appear sometime in 2006. Never make predictions.
|
||||
The next version will appear sometime in 2007. Never make predictions.
|
||||
|
||||
This document is Copyright 1995-2005 by Chester Ramey.
|
||||
This document is Copyright 1995-2006 by Chester Ramey.
|
||||
|
||||
Permission is hereby granted, without written agreement and
|
||||
without license or royalty fees, to use, copy, and distribute
|
||||
|
||||
+21
-12
@@ -1,4 +1,4 @@
|
||||
This is the Bash FAQ, version 3.32, for Bash version 3.1.
|
||||
This is the Bash FAQ, version 3.33, for Bash version 3.1.
|
||||
|
||||
This document contains a set of frequently-asked questions concerning
|
||||
Bash, the GNU Bourne-Again Shell. Bash is a freely-available command
|
||||
@@ -140,7 +140,7 @@ of Case Western Reserve University.
|
||||
|
||||
A2) What's the latest version?
|
||||
|
||||
The latest version is 3.1, first made available on xx December, 2005.
|
||||
The latest version is 3.1, first made available on 09 December, 2005.
|
||||
|
||||
A3) Where can I get it?
|
||||
|
||||
@@ -697,7 +697,7 @@ Things bash has that sh does not:
|
||||
read -e/-p/-a/-t/-n/-d/-s/-u,
|
||||
readonly -a/-f/name=value, trap -l, set +o,
|
||||
set -b/-m/-o option/-h/-p/-B/-C/-H/-P,
|
||||
unset -f/-v, ulimit -m/-p/-u,
|
||||
unset -f/-v, ulimit -i/-m/-p/-q/-u/-x,
|
||||
type -a/-p/-t/-f/-P, suspend -f, kill -n,
|
||||
test -o optname/s1 == s2/s1 < s2/s1 > s2/-nt/-ot/-ef/-O/-G/-S
|
||||
bash reads ~/.bashrc for interactive shells, $ENV for non-interactive
|
||||
@@ -793,8 +793,8 @@ Things bash has or uses that ksh88 does not:
|
||||
set -o braceexpand/-o histexpand/-o interactive-comments/
|
||||
-o notify/-o physical/-o posix/-o hashall/-o onecmd/
|
||||
-h/-B/-C/-b/-H/-P, set +o, suspend, trap -l, type,
|
||||
typeset -a/-F/-p, ulimit -u, umask -S, alias -p, shopt,
|
||||
disown, printf, complete, compgen
|
||||
typeset -a/-F/-p, ulimit -i/-q/-u/-x, umask -S, alias -p,
|
||||
shopt, disown, printf, complete, compgen
|
||||
`!' csh-style history expansion
|
||||
POSIX.2-style globbing character classes
|
||||
POSIX.2-style globbing equivalence classes
|
||||
@@ -1575,6 +1575,9 @@ this. These variables can be set in your .inputrc or using the bash
|
||||
The `set' commands between the single quotes may also be placed
|
||||
in ~/.inputrc.
|
||||
|
||||
The script examples/scripts.noah/meta.bash encapsulates the bind
|
||||
commands in a shell function.
|
||||
|
||||
G2) How do I write a function `x' to replace builtin command `x', but
|
||||
still invoke the command from within the function?
|
||||
|
||||
@@ -1748,13 +1751,9 @@ ftp.cwru.edu in the `pub/bash' directory.
|
||||
Cameron Newham and Bill Rosenblatt have written a book on bash, published
|
||||
by O'Reilly and Associates. The book is based on Bill Rosenblatt's Korn
|
||||
Shell book. The title is ``Learning the Bash Shell'', and the ISBN number
|
||||
is 1-56592-147-X. Look for it in fine bookstores near you. This book
|
||||
covers bash-1.14, but has an appendix describing some of the new features
|
||||
in bash-2.0.
|
||||
|
||||
A second edition of this book is available, published in January, 1998.
|
||||
The ISBN number is 1-56592-347-2. Look for it in the same fine bookstores
|
||||
or on the web.
|
||||
of the third edition, published in March, 2005, is 0-596-00965-8. Look for
|
||||
it in fine bookstores near you. This edition of the book has been updated
|
||||
to cover bash-3.0.
|
||||
|
||||
The GNU Bash Reference Manual has been published as a printed book by
|
||||
Network Theory Ltd (Paperback, ISBN: 0-9541617-7-7, Feb 2003). It covers
|
||||
@@ -1762,6 +1761,16 @@ bash-2.0 and is available from most online bookstores (see
|
||||
http://www.network-theory.co.uk/bash/manual/ for details). The publisher
|
||||
will donate $1 to the Free Software Foundation for each copy sold.
|
||||
|
||||
Arnold Robbins and Nelson Beebe have written ``Classic Shell Scripting'',
|
||||
published by O'Reilly. The first edition, with ISBN number 0-596-00595-4,
|
||||
was published in May, 2005.
|
||||
|
||||
Chris F. A. Johnson, a frequent contributor to comp.unix.shell and
|
||||
gnu.bash.bug, has written ``Shell Scripting Recipes: A Problem-Solution
|
||||
Approach,'' a new book on shell scripting, concentrating on features of
|
||||
the POSIX standard helpful to shell script writers. The first edition from
|
||||
Apress, with ISBN number 1-59059-471-1, was published in May, 2005.
|
||||
|
||||
H3) What's coming in future versions?
|
||||
|
||||
These are features I hope to include in a future version of bash.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
From: chet@po.cwru.edu (Chet Ramey)
|
||||
To: bug-bash@gnu.org
|
||||
Subject: BASH Frequently-Asked Questions (FAQ version 3.33)
|
||||
Subject: BASH Frequently-Asked Questions (FAQ version 3.34)
|
||||
Reply-To: chet@po.cwru.edu
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
Newsgroups: comp.unix.shell,comp.unix.questions
|
||||
Distribution: world
|
||||
From: chet@po.cwru.edu (Chet Ramey)
|
||||
Subject: BASH Frequently-Asked Questions (FAQ version 3.33)
|
||||
Subject: BASH Frequently-Asked Questions (FAQ version 3.34)
|
||||
Organization: Case Western Reserve University
|
||||
Summary: As to Qs about BASH, the Bourne-Again SHell
|
||||
Summary: A's to Q's about BASH, the Bourne-Again SHell
|
||||
Reply-To: chet@po.cwru.edu
|
||||
Followup-To: poster
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
Newsgroups: comp.unix.shell,comp.unix.questions,comp.answers,news.answers
|
||||
From: chet@po.cwru.edu (Chet Ramey)
|
||||
Subject: [gnu.bash.bug] BASH Frequently-Asked Questions (FAQ version 3.33)
|
||||
Subject: [gnu.bash.bug] BASH Frequently-Asked Questions (FAQ version 3.34)
|
||||
Organization: Case Western Reserve University
|
||||
Summary: As to Qs about BASH, the Bourne-Again SHell
|
||||
Summary: A's to Q's about BASH, the Bourne-Again SHell
|
||||
Reply-To: chet@po.cwru.edu
|
||||
Followup-To: poster
|
||||
Approved: news-answers-request@MIT.EDU
|
||||
|
||||
|
||||
+64
-29
@@ -1,18 +1,18 @@
|
||||
From: chet@po.cwru.edu (Chet Ramey)
|
||||
To: bug-bash@gnu.org
|
||||
Subject: BASH Frequently-Asked Questions (FAQ version 3.33)
|
||||
Subject: BASH Frequently-Asked Questions (FAQ version 3.34)
|
||||
Reply-To: chet@po.cwru.edu
|
||||
|
||||
Archive-name: unix-faq/shell/bash
|
||||
Posting-Frequency: monthly
|
||||
Submitted-By: chet@po.cwru.edu (Chet Ramey)
|
||||
Last-Modified: Thu Apr 13 13:19:33 EDT 2006
|
||||
FAQ-Version: 3.33
|
||||
Bash-Version: 3.1
|
||||
Last-Modified: Tue Oct 10 10:15:38 EDT 2006
|
||||
FAQ-Version: 3.34
|
||||
Bash-Version: 3.2
|
||||
URL: ftp://ftp.cwru.edu/pub/bash/FAQ
|
||||
Maintainer: chet@po.cwru.edu (Chet Ramey)
|
||||
|
||||
This is the Bash FAQ, version 3.33, for Bash version 3.1.
|
||||
This is the Bash FAQ, version 3.34, for Bash version 3.2.
|
||||
|
||||
This document contains a set of frequently-asked questions concerning
|
||||
Bash, the GNU Bourne-Again Shell. Bash is a freely-available command
|
||||
@@ -23,7 +23,7 @@ Another good source of basic information about shells is the collection
|
||||
of FAQ articles periodically posted to comp.unix.shell.
|
||||
|
||||
Questions and comments concerning this document should be sent to
|
||||
chet@po.cwru.edu.
|
||||
chet.ramey@case.edu.
|
||||
|
||||
This document is available for anonymous FTP with the URL
|
||||
|
||||
@@ -50,8 +50,8 @@ A10) What is the bash `posix mode'?
|
||||
|
||||
Section B: The latest version
|
||||
|
||||
B1) What's new in version 3.1?
|
||||
B2) Are there any user-visible incompatibilities between bash-3.1 and
|
||||
B1) What's new in version 3.2?
|
||||
B2) Are there any user-visible incompatibilities between bash-3.2 and
|
||||
bash-2.05b?
|
||||
|
||||
Section C: Differences from other Unix shells
|
||||
@@ -92,6 +92,7 @@ E10) Why does `cd //' leave $PWD as `//'?
|
||||
E11) If I resize my xterm while another program is running, why doesn't bash
|
||||
notice the change?
|
||||
E12) Why don't negative offsets in substring expansion work like I expect?
|
||||
E13) Why does filename completion misbehave if a colon appears in the filename?
|
||||
|
||||
Section F: Things to watch out for on certain Unix versions
|
||||
|
||||
@@ -154,26 +155,26 @@ of Case Western Reserve University.
|
||||
|
||||
A2) What's the latest version?
|
||||
|
||||
The latest version is 3.1, first made available on 09 December, 2005.
|
||||
The latest version is 3.2, first made available on 12 October, 2006.
|
||||
|
||||
A3) Where can I get it?
|
||||
|
||||
Bash is the GNU project's shell, and so is available from the
|
||||
master GNU archive site, ftp.gnu.org, and its mirrors. The
|
||||
latest version is also available for FTP from ftp.cwru.edu.
|
||||
The following URLs tell how to get version 3.1:
|
||||
The following URLs tell how to get version 3.2:
|
||||
|
||||
ftp://ftp.gnu.org/pub/gnu/bash/bash-3.1.tar.gz
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-3.1.tar.gz
|
||||
ftp://ftp.gnu.org/pub/gnu/bash/bash-3.2.tar.gz
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-3.2.tar.gz
|
||||
|
||||
Formatted versions of the documentation are available with the URLs:
|
||||
|
||||
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.1.tar.gz
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-doc-3.1.tar.gz
|
||||
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.2.tar.gz
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-doc-3.2.tar.gz
|
||||
|
||||
Any patches for the current version are available with the URL:
|
||||
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-3.1-patches/
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-3.2-patches/
|
||||
|
||||
A4) On what machines will bash run?
|
||||
|
||||
@@ -206,7 +207,7 @@ http://www.cygwin.com/.
|
||||
Cygnus originally ported bash-1.14.7, and that port was part of their
|
||||
early GNU-Win32 (the original name) releases. Cygnus has also done
|
||||
ports of bash-2.05b and bash-3.0 to the CYGWIN environment, and both
|
||||
are available as part of their current release. Bash-3.1 is currently
|
||||
are available as part of their current release. Bash-3.2 is currently
|
||||
being tested and should be available soon.
|
||||
|
||||
Bash-2.05b and later versions should require no local Cygnus changes to
|
||||
@@ -230,7 +231,7 @@ Mark began to work with bash-2.05, but I don't know the current status.
|
||||
|
||||
Bash-3.0 compiles and runs with no modifications under Microsoft's Services
|
||||
for Unix (SFU), once known as Interix. I do not anticipate any problems
|
||||
with building bash-3.1.
|
||||
with building bash-3.1 or bash-3.2.
|
||||
|
||||
A6) How can I build bash with gcc?
|
||||
|
||||
@@ -399,12 +400,22 @@ They are also listed in a section in the Bash Reference Manual
|
||||
|
||||
Section B: The latest version
|
||||
|
||||
B1) What's new in version 3.1?
|
||||
B1) What's new in version 3.2?
|
||||
|
||||
Bash-3.1 is the first maintenance release of the third major release of
|
||||
Bash-3.2 is the second maintenance release of the third major release of
|
||||
bash. It contains the following significant new features (see the manual
|
||||
page for complete descriptions and the CHANGES and NEWS files in the
|
||||
bash-3.1 distribution).
|
||||
bash-3.2 distribution).
|
||||
|
||||
o Bash-3.2 now checks shell scripts for NUL characters rather than non-printing
|
||||
characters when deciding whether or not a script is a binary file.
|
||||
|
||||
o Quoting the string argument to the [[ command's =~ (regexp) operator now
|
||||
forces string matching, as with the other pattern-matching operators.
|
||||
|
||||
A short feature history dating from Bash-2.0:
|
||||
|
||||
Bash-3.1 contained the following new features:
|
||||
|
||||
o Bash-3.1 may now be configured and built in a mode that enforces strict
|
||||
POSIX compliance.
|
||||
@@ -415,8 +426,6 @@ o The `+=' assignment operator, which appends to the value of a string or
|
||||
o It is now possible to ignore case when matching in contexts other than
|
||||
filename generation using the new `nocasematch' shell option.
|
||||
|
||||
A short feature history dating from Bash-2.0:
|
||||
|
||||
Bash-3.0 contained the following new features:
|
||||
|
||||
o Features to support the bash debugger have been implemented, and there
|
||||
@@ -654,10 +663,10 @@ grammar tighter and smaller (66 reduce-reduce conflicts gone)
|
||||
lots of code now smaller and faster
|
||||
test suite greatly expanded
|
||||
|
||||
B2) Are there any user-visible incompatibilities between bash-3.1 and
|
||||
B2) Are there any user-visible incompatibilities between bash-3.2 and
|
||||
bash-2.05b?
|
||||
|
||||
There are a few incompatibilities between version 2.05b and version 3.1.
|
||||
There are a few incompatibilities between version 2.05b and version 3.2.
|
||||
They are detailed in the file COMPAT in the bash distribution. That file
|
||||
is not meant to be all-encompassing; send mail to bash-maintainers@gnu.org
|
||||
if if you find something that's not mentioned there.
|
||||
@@ -851,7 +860,7 @@ Implementation differences:
|
||||
|
||||
C3) Which new features in ksh-93 are not in bash, and which are?
|
||||
|
||||
New things in ksh-93 not in bash-3.0:
|
||||
New things in ksh-93 not in bash-3.2:
|
||||
associative arrays
|
||||
floating point arithmetic and variables
|
||||
math library functions
|
||||
@@ -877,7 +886,7 @@ New things in ksh-93 not in bash-3.0:
|
||||
lexical scoping for local variables in `ksh' functions
|
||||
no scoping for local variables in `POSIX' functions
|
||||
|
||||
New things in ksh-93 present in bash-3.0:
|
||||
New things in ksh-93 present in bash-3.2:
|
||||
[n]<&word- and [n]>&word- redirections (combination dup and close)
|
||||
for (( expr1; expr2; expr3 )) ; do list; done - arithmetic for command
|
||||
?:, ++, --, `expr1 , expr2' arithmetic operators
|
||||
@@ -1127,7 +1136,7 @@ will try to write on a pipe without a reader. In that case, bash
|
||||
will print `Broken pipe' to stderr when ps is killed by a
|
||||
SIGPIPE.
|
||||
|
||||
As of bash-3.1, bash will not report SIGPIPE errors by default. You
|
||||
As of bash-3.1, bash does not report SIGPIPE errors by default. You
|
||||
can build a version of bash that will report such errors.
|
||||
|
||||
E3) When I have terminal escape sequences in my prompt, why does bash
|
||||
@@ -1404,6 +1413,32 @@ expanded value of param is unset or null, and $param otherwise.
|
||||
To use negative offsets that begin with a minus sign, separate the
|
||||
minus sign and the colon with a space.
|
||||
|
||||
E13) Why does filename completion misbehave if a colon appears in the filename?
|
||||
|
||||
Filename completion (and word completion in general) may appear to behave
|
||||
improperly if there is a colon in the word to be completed.
|
||||
|
||||
The colon is special to readline's word completion code: it is one of the
|
||||
characters that breaks words for the completer. Readline uses these characters
|
||||
in sort of the same way that bash uses $IFS: they break or separate the words
|
||||
the completion code hands to the application-specific or default word
|
||||
completion functions. The original intent was to make it easy to edit
|
||||
colon-separated lists (such as $PATH in bash) in various applications using
|
||||
readline for input.
|
||||
|
||||
This is complicated by the fact that some versions of the popular
|
||||
`bash-completion' programmable completion package have problems with the
|
||||
default completion behavior in the presence of colons.
|
||||
|
||||
The current set of completion word break characters is available in bash as
|
||||
the value of the COMP_WORDBREAKS variable. Removing `:' from that value is
|
||||
enough to make the colon not special to completion:
|
||||
|
||||
COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
|
||||
|
||||
You can also quote the colon with a backslash to achieve the same result
|
||||
temporarily.
|
||||
|
||||
Section F: Things to watch out for on certain Unix versions
|
||||
|
||||
F1) Why can't I use command line editing in my `cmdtool'?
|
||||
@@ -1809,9 +1844,9 @@ Some of the new ksh93 pattern matching operators, like backreferencing
|
||||
|
||||
H5) When will the next release appear?
|
||||
|
||||
The next version will appear sometime in 2006. Never make predictions.
|
||||
The next version will appear sometime in 2007. Never make predictions.
|
||||
|
||||
This document is Copyright 1995-2005 by Chester Ramey.
|
||||
This document is Copyright 1995-2006 by Chester Ramey.
|
||||
|
||||
Permission is hereby granted, without written agreement and
|
||||
without license or royalty fees, to use, copy, and distribute
|
||||
|
||||
+66
-30
@@ -1,21 +1,22 @@
|
||||
Newsgroups: comp.unix.shell,comp.unix.questions
|
||||
Distribution: world
|
||||
From: chet@po.cwru.edu (Chet Ramey)
|
||||
Subject: BASH Frequently-Asked Questions (FAQ version 3.33)
|
||||
Subject: BASH Frequently-Asked Questions (FAQ version 3.34)
|
||||
Organization: Case Western Reserve University
|
||||
Summary: As to Qs about BASH, the Bourne-Again SHell
|
||||
Summary: A's to Q's about BASH, the Bourne-Again SHell
|
||||
Reply-To: chet@po.cwru.edu
|
||||
Followup-To: poster
|
||||
|
||||
Archive-name: unix-faq/shell/bash
|
||||
Posting-Frequency: monthly
|
||||
Submitted-By: chet@po.cwru.edu (Chet Ramey)
|
||||
Last-Modified: Thu Apr 13 13:19:33 EDT 2006
|
||||
FAQ-Version: 3.33
|
||||
Bash-Version: 3.1
|
||||
Last-Modified: Tue Oct 10 10:15:38 EDT 2006
|
||||
FAQ-Version: 3.34
|
||||
Bash-Version: 3.2
|
||||
URL: ftp://ftp.cwru.edu/pub/bash/FAQ
|
||||
Maintainer: chet@po.cwru.edu (Chet Ramey)
|
||||
|
||||
This is the Bash FAQ, version 3.33, for Bash version 3.1.
|
||||
This is the Bash FAQ, version 3.34, for Bash version 3.2.
|
||||
|
||||
This document contains a set of frequently-asked questions concerning
|
||||
Bash, the GNU Bourne-Again Shell. Bash is a freely-available command
|
||||
@@ -26,7 +27,7 @@ Another good source of basic information about shells is the collection
|
||||
of FAQ articles periodically posted to comp.unix.shell.
|
||||
|
||||
Questions and comments concerning this document should be sent to
|
||||
chet@po.cwru.edu.
|
||||
chet.ramey@case.edu.
|
||||
|
||||
This document is available for anonymous FTP with the URL
|
||||
|
||||
@@ -53,8 +54,8 @@ A10) What is the bash `posix mode'?
|
||||
|
||||
Section B: The latest version
|
||||
|
||||
B1) What's new in version 3.1?
|
||||
B2) Are there any user-visible incompatibilities between bash-3.1 and
|
||||
B1) What's new in version 3.2?
|
||||
B2) Are there any user-visible incompatibilities between bash-3.2 and
|
||||
bash-2.05b?
|
||||
|
||||
Section C: Differences from other Unix shells
|
||||
@@ -95,6 +96,7 @@ E10) Why does `cd //' leave $PWD as `//'?
|
||||
E11) If I resize my xterm while another program is running, why doesn't bash
|
||||
notice the change?
|
||||
E12) Why don't negative offsets in substring expansion work like I expect?
|
||||
E13) Why does filename completion misbehave if a colon appears in the filename?
|
||||
|
||||
Section F: Things to watch out for on certain Unix versions
|
||||
|
||||
@@ -157,26 +159,26 @@ of Case Western Reserve University.
|
||||
|
||||
A2) What's the latest version?
|
||||
|
||||
The latest version is 3.1, first made available on 09 December, 2005.
|
||||
The latest version is 3.2, first made available on 12 October, 2006.
|
||||
|
||||
A3) Where can I get it?
|
||||
|
||||
Bash is the GNU project's shell, and so is available from the
|
||||
master GNU archive site, ftp.gnu.org, and its mirrors. The
|
||||
latest version is also available for FTP from ftp.cwru.edu.
|
||||
The following URLs tell how to get version 3.1:
|
||||
The following URLs tell how to get version 3.2:
|
||||
|
||||
ftp://ftp.gnu.org/pub/gnu/bash/bash-3.1.tar.gz
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-3.1.tar.gz
|
||||
ftp://ftp.gnu.org/pub/gnu/bash/bash-3.2.tar.gz
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-3.2.tar.gz
|
||||
|
||||
Formatted versions of the documentation are available with the URLs:
|
||||
|
||||
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.1.tar.gz
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-doc-3.1.tar.gz
|
||||
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.2.tar.gz
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-doc-3.2.tar.gz
|
||||
|
||||
Any patches for the current version are available with the URL:
|
||||
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-3.1-patches/
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-3.2-patches/
|
||||
|
||||
A4) On what machines will bash run?
|
||||
|
||||
@@ -209,7 +211,7 @@ http://www.cygwin.com/.
|
||||
Cygnus originally ported bash-1.14.7, and that port was part of their
|
||||
early GNU-Win32 (the original name) releases. Cygnus has also done
|
||||
ports of bash-2.05b and bash-3.0 to the CYGWIN environment, and both
|
||||
are available as part of their current release. Bash-3.1 is currently
|
||||
are available as part of their current release. Bash-3.2 is currently
|
||||
being tested and should be available soon.
|
||||
|
||||
Bash-2.05b and later versions should require no local Cygnus changes to
|
||||
@@ -233,7 +235,7 @@ Mark began to work with bash-2.05, but I don't know the current status.
|
||||
|
||||
Bash-3.0 compiles and runs with no modifications under Microsoft's Services
|
||||
for Unix (SFU), once known as Interix. I do not anticipate any problems
|
||||
with building bash-3.1.
|
||||
with building bash-3.1 or bash-3.2.
|
||||
|
||||
A6) How can I build bash with gcc?
|
||||
|
||||
@@ -402,12 +404,22 @@ They are also listed in a section in the Bash Reference Manual
|
||||
|
||||
Section B: The latest version
|
||||
|
||||
B1) What's new in version 3.1?
|
||||
B1) What's new in version 3.2?
|
||||
|
||||
Bash-3.1 is the first maintenance release of the third major release of
|
||||
Bash-3.2 is the second maintenance release of the third major release of
|
||||
bash. It contains the following significant new features (see the manual
|
||||
page for complete descriptions and the CHANGES and NEWS files in the
|
||||
bash-3.1 distribution).
|
||||
bash-3.2 distribution).
|
||||
|
||||
o Bash-3.2 now checks shell scripts for NUL characters rather than non-printing
|
||||
characters when deciding whether or not a script is a binary file.
|
||||
|
||||
o Quoting the string argument to the [[ command's =~ (regexp) operator now
|
||||
forces string matching, as with the other pattern-matching operators.
|
||||
|
||||
A short feature history dating from Bash-2.0:
|
||||
|
||||
Bash-3.1 contained the following new features:
|
||||
|
||||
o Bash-3.1 may now be configured and built in a mode that enforces strict
|
||||
POSIX compliance.
|
||||
@@ -418,8 +430,6 @@ o The `+=' assignment operator, which appends to the value of a string or
|
||||
o It is now possible to ignore case when matching in contexts other than
|
||||
filename generation using the new `nocasematch' shell option.
|
||||
|
||||
A short feature history dating from Bash-2.0:
|
||||
|
||||
Bash-3.0 contained the following new features:
|
||||
|
||||
o Features to support the bash debugger have been implemented, and there
|
||||
@@ -657,10 +667,10 @@ grammar tighter and smaller (66 reduce-reduce conflicts gone)
|
||||
lots of code now smaller and faster
|
||||
test suite greatly expanded
|
||||
|
||||
B2) Are there any user-visible incompatibilities between bash-3.1 and
|
||||
B2) Are there any user-visible incompatibilities between bash-3.2 and
|
||||
bash-2.05b?
|
||||
|
||||
There are a few incompatibilities between version 2.05b and version 3.1.
|
||||
There are a few incompatibilities between version 2.05b and version 3.2.
|
||||
They are detailed in the file COMPAT in the bash distribution. That file
|
||||
is not meant to be all-encompassing; send mail to bash-maintainers@gnu.org
|
||||
if if you find something that's not mentioned there.
|
||||
@@ -854,7 +864,7 @@ Implementation differences:
|
||||
|
||||
C3) Which new features in ksh-93 are not in bash, and which are?
|
||||
|
||||
New things in ksh-93 not in bash-3.0:
|
||||
New things in ksh-93 not in bash-3.2:
|
||||
associative arrays
|
||||
floating point arithmetic and variables
|
||||
math library functions
|
||||
@@ -880,7 +890,7 @@ New things in ksh-93 not in bash-3.0:
|
||||
lexical scoping for local variables in `ksh' functions
|
||||
no scoping for local variables in `POSIX' functions
|
||||
|
||||
New things in ksh-93 present in bash-3.0:
|
||||
New things in ksh-93 present in bash-3.2:
|
||||
[n]<&word- and [n]>&word- redirections (combination dup and close)
|
||||
for (( expr1; expr2; expr3 )) ; do list; done - arithmetic for command
|
||||
?:, ++, --, `expr1 , expr2' arithmetic operators
|
||||
@@ -1130,7 +1140,7 @@ will try to write on a pipe without a reader. In that case, bash
|
||||
will print `Broken pipe' to stderr when ps is killed by a
|
||||
SIGPIPE.
|
||||
|
||||
As of bash-3.1, bash will not report SIGPIPE errors by default. You
|
||||
As of bash-3.1, bash does not report SIGPIPE errors by default. You
|
||||
can build a version of bash that will report such errors.
|
||||
|
||||
E3) When I have terminal escape sequences in my prompt, why does bash
|
||||
@@ -1407,6 +1417,32 @@ expanded value of param is unset or null, and $param otherwise.
|
||||
To use negative offsets that begin with a minus sign, separate the
|
||||
minus sign and the colon with a space.
|
||||
|
||||
E13) Why does filename completion misbehave if a colon appears in the filename?
|
||||
|
||||
Filename completion (and word completion in general) may appear to behave
|
||||
improperly if there is a colon in the word to be completed.
|
||||
|
||||
The colon is special to readline's word completion code: it is one of the
|
||||
characters that breaks words for the completer. Readline uses these characters
|
||||
in sort of the same way that bash uses $IFS: they break or separate the words
|
||||
the completion code hands to the application-specific or default word
|
||||
completion functions. The original intent was to make it easy to edit
|
||||
colon-separated lists (such as $PATH in bash) in various applications using
|
||||
readline for input.
|
||||
|
||||
This is complicated by the fact that some versions of the popular
|
||||
`bash-completion' programmable completion package have problems with the
|
||||
default completion behavior in the presence of colons.
|
||||
|
||||
The current set of completion word break characters is available in bash as
|
||||
the value of the COMP_WORDBREAKS variable. Removing `:' from that value is
|
||||
enough to make the colon not special to completion:
|
||||
|
||||
COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
|
||||
|
||||
You can also quote the colon with a backslash to achieve the same result
|
||||
temporarily.
|
||||
|
||||
Section F: Things to watch out for on certain Unix versions
|
||||
|
||||
F1) Why can't I use command line editing in my `cmdtool'?
|
||||
@@ -1812,9 +1848,9 @@ Some of the new ksh93 pattern matching operators, like backreferencing
|
||||
|
||||
H5) When will the next release appear?
|
||||
|
||||
The next version will appear sometime in 2006. Never make predictions.
|
||||
The next version will appear sometime in 2007. Never make predictions.
|
||||
|
||||
This document is Copyright 1995-2005 by Chester Ramey.
|
||||
This document is Copyright 1995-2006 by Chester Ramey.
|
||||
|
||||
Permission is hereby granted, without written agreement and
|
||||
without license or royalty fees, to use, copy, and distribute
|
||||
|
||||
+66
-30
@@ -1,21 +1,22 @@
|
||||
Newsgroups: comp.unix.shell,comp.unix.questions,comp.answers,news.answers
|
||||
From: chet@po.cwru.edu (Chet Ramey)
|
||||
Subject: [gnu.bash.bug] BASH Frequently-Asked Questions (FAQ version 3.33)
|
||||
Subject: [gnu.bash.bug] BASH Frequently-Asked Questions (FAQ version 3.34)
|
||||
Organization: Case Western Reserve University
|
||||
Summary: As to Qs about BASH, the Bourne-Again SHell
|
||||
Summary: A's to Q's about BASH, the Bourne-Again SHell
|
||||
Reply-To: chet@po.cwru.edu
|
||||
Followup-To: poster
|
||||
Approved: news-answers-request@MIT.EDU
|
||||
|
||||
Archive-name: unix-faq/shell/bash
|
||||
Posting-Frequency: monthly
|
||||
Submitted-By: chet@po.cwru.edu (Chet Ramey)
|
||||
Last-Modified: Thu Apr 13 13:19:33 EDT 2006
|
||||
FAQ-Version: 3.33
|
||||
Bash-Version: 3.1
|
||||
Last-Modified: Tue Oct 10 10:15:38 EDT 2006
|
||||
FAQ-Version: 3.34
|
||||
Bash-Version: 3.2
|
||||
URL: ftp://ftp.cwru.edu/pub/bash/FAQ
|
||||
Maintainer: chet@po.cwru.edu (Chet Ramey)
|
||||
|
||||
This is the Bash FAQ, version 3.33, for Bash version 3.1.
|
||||
This is the Bash FAQ, version 3.34, for Bash version 3.2.
|
||||
|
||||
This document contains a set of frequently-asked questions concerning
|
||||
Bash, the GNU Bourne-Again Shell. Bash is a freely-available command
|
||||
@@ -26,7 +27,7 @@ Another good source of basic information about shells is the collection
|
||||
of FAQ articles periodically posted to comp.unix.shell.
|
||||
|
||||
Questions and comments concerning this document should be sent to
|
||||
chet@po.cwru.edu.
|
||||
chet.ramey@case.edu.
|
||||
|
||||
This document is available for anonymous FTP with the URL
|
||||
|
||||
@@ -53,8 +54,8 @@ A10) What is the bash `posix mode'?
|
||||
|
||||
Section B: The latest version
|
||||
|
||||
B1) What's new in version 3.1?
|
||||
B2) Are there any user-visible incompatibilities between bash-3.1 and
|
||||
B1) What's new in version 3.2?
|
||||
B2) Are there any user-visible incompatibilities between bash-3.2 and
|
||||
bash-2.05b?
|
||||
|
||||
Section C: Differences from other Unix shells
|
||||
@@ -95,6 +96,7 @@ E10) Why does `cd //' leave $PWD as `//'?
|
||||
E11) If I resize my xterm while another program is running, why doesn't bash
|
||||
notice the change?
|
||||
E12) Why don't negative offsets in substring expansion work like I expect?
|
||||
E13) Why does filename completion misbehave if a colon appears in the filename?
|
||||
|
||||
Section F: Things to watch out for on certain Unix versions
|
||||
|
||||
@@ -157,26 +159,26 @@ of Case Western Reserve University.
|
||||
|
||||
A2) What's the latest version?
|
||||
|
||||
The latest version is 3.1, first made available on 09 December, 2005.
|
||||
The latest version is 3.2, first made available on 12 October, 2006.
|
||||
|
||||
A3) Where can I get it?
|
||||
|
||||
Bash is the GNU project's shell, and so is available from the
|
||||
master GNU archive site, ftp.gnu.org, and its mirrors. The
|
||||
latest version is also available for FTP from ftp.cwru.edu.
|
||||
The following URLs tell how to get version 3.1:
|
||||
The following URLs tell how to get version 3.2:
|
||||
|
||||
ftp://ftp.gnu.org/pub/gnu/bash/bash-3.1.tar.gz
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-3.1.tar.gz
|
||||
ftp://ftp.gnu.org/pub/gnu/bash/bash-3.2.tar.gz
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-3.2.tar.gz
|
||||
|
||||
Formatted versions of the documentation are available with the URLs:
|
||||
|
||||
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.1.tar.gz
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-doc-3.1.tar.gz
|
||||
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.2.tar.gz
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-doc-3.2.tar.gz
|
||||
|
||||
Any patches for the current version are available with the URL:
|
||||
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-3.1-patches/
|
||||
ftp://ftp.cwru.edu/pub/bash/bash-3.2-patches/
|
||||
|
||||
A4) On what machines will bash run?
|
||||
|
||||
@@ -209,7 +211,7 @@ http://www.cygwin.com/.
|
||||
Cygnus originally ported bash-1.14.7, and that port was part of their
|
||||
early GNU-Win32 (the original name) releases. Cygnus has also done
|
||||
ports of bash-2.05b and bash-3.0 to the CYGWIN environment, and both
|
||||
are available as part of their current release. Bash-3.1 is currently
|
||||
are available as part of their current release. Bash-3.2 is currently
|
||||
being tested and should be available soon.
|
||||
|
||||
Bash-2.05b and later versions should require no local Cygnus changes to
|
||||
@@ -233,7 +235,7 @@ Mark began to work with bash-2.05, but I don't know the current status.
|
||||
|
||||
Bash-3.0 compiles and runs with no modifications under Microsoft's Services
|
||||
for Unix (SFU), once known as Interix. I do not anticipate any problems
|
||||
with building bash-3.1.
|
||||
with building bash-3.1 or bash-3.2.
|
||||
|
||||
A6) How can I build bash with gcc?
|
||||
|
||||
@@ -402,12 +404,22 @@ They are also listed in a section in the Bash Reference Manual
|
||||
|
||||
Section B: The latest version
|
||||
|
||||
B1) What's new in version 3.1?
|
||||
B1) What's new in version 3.2?
|
||||
|
||||
Bash-3.1 is the first maintenance release of the third major release of
|
||||
Bash-3.2 is the second maintenance release of the third major release of
|
||||
bash. It contains the following significant new features (see the manual
|
||||
page for complete descriptions and the CHANGES and NEWS files in the
|
||||
bash-3.1 distribution).
|
||||
bash-3.2 distribution).
|
||||
|
||||
o Bash-3.2 now checks shell scripts for NUL characters rather than non-printing
|
||||
characters when deciding whether or not a script is a binary file.
|
||||
|
||||
o Quoting the string argument to the [[ command's =~ (regexp) operator now
|
||||
forces string matching, as with the other pattern-matching operators.
|
||||
|
||||
A short feature history dating from Bash-2.0:
|
||||
|
||||
Bash-3.1 contained the following new features:
|
||||
|
||||
o Bash-3.1 may now be configured and built in a mode that enforces strict
|
||||
POSIX compliance.
|
||||
@@ -418,8 +430,6 @@ o The `+=' assignment operator, which appends to the value of a string or
|
||||
o It is now possible to ignore case when matching in contexts other than
|
||||
filename generation using the new `nocasematch' shell option.
|
||||
|
||||
A short feature history dating from Bash-2.0:
|
||||
|
||||
Bash-3.0 contained the following new features:
|
||||
|
||||
o Features to support the bash debugger have been implemented, and there
|
||||
@@ -657,10 +667,10 @@ grammar tighter and smaller (66 reduce-reduce conflicts gone)
|
||||
lots of code now smaller and faster
|
||||
test suite greatly expanded
|
||||
|
||||
B2) Are there any user-visible incompatibilities between bash-3.1 and
|
||||
B2) Are there any user-visible incompatibilities between bash-3.2 and
|
||||
bash-2.05b?
|
||||
|
||||
There are a few incompatibilities between version 2.05b and version 3.1.
|
||||
There are a few incompatibilities between version 2.05b and version 3.2.
|
||||
They are detailed in the file COMPAT in the bash distribution. That file
|
||||
is not meant to be all-encompassing; send mail to bash-maintainers@gnu.org
|
||||
if if you find something that's not mentioned there.
|
||||
@@ -854,7 +864,7 @@ Implementation differences:
|
||||
|
||||
C3) Which new features in ksh-93 are not in bash, and which are?
|
||||
|
||||
New things in ksh-93 not in bash-3.0:
|
||||
New things in ksh-93 not in bash-3.2:
|
||||
associative arrays
|
||||
floating point arithmetic and variables
|
||||
math library functions
|
||||
@@ -880,7 +890,7 @@ New things in ksh-93 not in bash-3.0:
|
||||
lexical scoping for local variables in `ksh' functions
|
||||
no scoping for local variables in `POSIX' functions
|
||||
|
||||
New things in ksh-93 present in bash-3.0:
|
||||
New things in ksh-93 present in bash-3.2:
|
||||
[n]<&word- and [n]>&word- redirections (combination dup and close)
|
||||
for (( expr1; expr2; expr3 )) ; do list; done - arithmetic for command
|
||||
?:, ++, --, `expr1 , expr2' arithmetic operators
|
||||
@@ -1130,7 +1140,7 @@ will try to write on a pipe without a reader. In that case, bash
|
||||
will print `Broken pipe' to stderr when ps is killed by a
|
||||
SIGPIPE.
|
||||
|
||||
As of bash-3.1, bash will not report SIGPIPE errors by default. You
|
||||
As of bash-3.1, bash does not report SIGPIPE errors by default. You
|
||||
can build a version of bash that will report such errors.
|
||||
|
||||
E3) When I have terminal escape sequences in my prompt, why does bash
|
||||
@@ -1407,6 +1417,32 @@ expanded value of param is unset or null, and $param otherwise.
|
||||
To use negative offsets that begin with a minus sign, separate the
|
||||
minus sign and the colon with a space.
|
||||
|
||||
E13) Why does filename completion misbehave if a colon appears in the filename?
|
||||
|
||||
Filename completion (and word completion in general) may appear to behave
|
||||
improperly if there is a colon in the word to be completed.
|
||||
|
||||
The colon is special to readline's word completion code: it is one of the
|
||||
characters that breaks words for the completer. Readline uses these characters
|
||||
in sort of the same way that bash uses $IFS: they break or separate the words
|
||||
the completion code hands to the application-specific or default word
|
||||
completion functions. The original intent was to make it easy to edit
|
||||
colon-separated lists (such as $PATH in bash) in various applications using
|
||||
readline for input.
|
||||
|
||||
This is complicated by the fact that some versions of the popular
|
||||
`bash-completion' programmable completion package have problems with the
|
||||
default completion behavior in the presence of colons.
|
||||
|
||||
The current set of completion word break characters is available in bash as
|
||||
the value of the COMP_WORDBREAKS variable. Removing `:' from that value is
|
||||
enough to make the colon not special to completion:
|
||||
|
||||
COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
|
||||
|
||||
You can also quote the colon with a backslash to achieve the same result
|
||||
temporarily.
|
||||
|
||||
Section F: Things to watch out for on certain Unix versions
|
||||
|
||||
F1) Why can't I use command line editing in my `cmdtool'?
|
||||
@@ -1812,9 +1848,9 @@ Some of the new ksh93 pattern matching operators, like backreferencing
|
||||
|
||||
H5) When will the next release appear?
|
||||
|
||||
The next version will appear sometime in 2006. Never make predictions.
|
||||
The next version will appear sometime in 2007. Never make predictions.
|
||||
|
||||
This document is Copyright 1995-2005 by Chester Ramey.
|
||||
This document is Copyright 1995-2006 by Chester Ramey.
|
||||
|
||||
Permission is hereby granted, without written agreement and
|
||||
without license or royalty fees, to use, copy, and distribute
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
Archive-name: unix-faq/shell/bash
|
||||
Posting-Frequency: monthly
|
||||
Submitted-By: chet@po.cwru.edu (Chet Ramey)
|
||||
Last-Modified: Thu Apr 13 13:19:33 EDT 2006
|
||||
FAQ-Version: 3.33
|
||||
Bash-Version: 3.1
|
||||
Last-Modified: Tue Oct 10 10:15:38 EDT 2006
|
||||
FAQ-Version: 3.34
|
||||
Bash-Version: 3.2
|
||||
URL: ftp://ftp.cwru.edu/pub/bash/FAQ
|
||||
Maintainer: chet@po.cwru.edu (Chet Ramey)
|
||||
|
||||
|
||||
@@ -1029,6 +1029,7 @@ timespec: TIME
|
||||
#define PST_CMDTOKEN 0x1000 /* command token OK - unused */
|
||||
#define PST_COMPASSIGN 0x2000 /* parsing x=(...) compound assignment */
|
||||
#define PST_ASSIGNOK 0x4000 /* assignment statement ok in this context */
|
||||
#define PST_REGEXP 0x8000 /* parsing an ERE/BRE as a single word */
|
||||
|
||||
/* Initial size to allocate for tokens, and the
|
||||
amount to grow them by. */
|
||||
@@ -2591,6 +2592,9 @@ read_token (command)
|
||||
return (character);
|
||||
}
|
||||
|
||||
if (parser_state & PST_REGEXP)
|
||||
goto tokword;
|
||||
|
||||
/* Shell meta-characters. */
|
||||
if MBTEST(shellmeta (character) && ((parser_state & PST_DBLPAREN) == 0))
|
||||
{
|
||||
@@ -2698,6 +2702,7 @@ read_token (command)
|
||||
if MBTEST(character == '-' && (last_read_token == LESS_AND || last_read_token == GREATER_AND))
|
||||
return (character);
|
||||
|
||||
tokword:
|
||||
/* Okay, if we got this far, we have to read a word. Read one,
|
||||
and then check it against the known ones. */
|
||||
result = read_token_word (character);
|
||||
@@ -2735,7 +2740,7 @@ parse_matched_pair (qc, open, close, lenp, flags)
|
||||
/* itrace("parse_matched_pair: open = %c close = %c", open, close); */
|
||||
count = 1;
|
||||
pass_next_character = backq_backslash = was_dollar = in_comment = 0;
|
||||
check_comment = (flags & P_COMMAND) && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0;
|
||||
check_comment = (flags & P_COMMAND) && qc != '`' && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0;
|
||||
|
||||
/* RFLAGS is the set of flags we want to pass to recursive calls. */
|
||||
rflags = (qc == '"') ? P_DQUOTE : (flags & P_DQUOTE);
|
||||
@@ -3202,8 +3207,11 @@ cond_term ()
|
||||
if (tok == WORD && test_binop (yylval.word->word))
|
||||
op = yylval.word;
|
||||
#if defined (COND_REGEXP)
|
||||
else if (tok == WORD && STREQ (yylval.word->word,"=~"))
|
||||
op = yylval.word;
|
||||
else if (tok == WORD && STREQ (yylval.word->word, "=~"))
|
||||
{
|
||||
op = yylval.word;
|
||||
parser_state |= PST_REGEXP;
|
||||
}
|
||||
#endif
|
||||
else if (tok == '<' || tok == '>')
|
||||
op = make_word_from_token (tok); /* ( */
|
||||
@@ -3234,6 +3242,7 @@ cond_term ()
|
||||
|
||||
/* rhs */
|
||||
tok = read_token (READ);
|
||||
parser_state &= ~PST_REGEXP;
|
||||
if (tok == WORD)
|
||||
{
|
||||
tright = make_cond_node (COND_TERM, yylval.word, (COND_COM *)NULL, (COND_COM *)NULL);
|
||||
@@ -3419,9 +3428,34 @@ read_token_word (character)
|
||||
goto next_character;
|
||||
}
|
||||
|
||||
#ifdef COND_REGEXP
|
||||
/* When parsing a regexp as a single word inside a conditional command,
|
||||
we need to special-case characters special to both the shell and
|
||||
regular expressions. Right now, that is only '(' and '|'. */ /*)*/
|
||||
if MBTEST((parser_state & PST_REGEXP) && (character == '(' || character == '|')) /*)*/
|
||||
{
|
||||
if (character == '|')
|
||||
goto got_character;
|
||||
|
||||
push_delimiter (dstack, character);
|
||||
ttok = parse_matched_pair (cd, '(', ')', &ttoklen, 0);
|
||||
pop_delimiter (dstack);
|
||||
if (ttok == &matched_pair_error)
|
||||
return -1; /* Bail immediately. */
|
||||
RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 2,
|
||||
token_buffer_size, TOKEN_DEFAULT_GROW_SIZE);
|
||||
token[token_index++] = character;
|
||||
strcpy (token + token_index, ttok);
|
||||
token_index += ttoklen;
|
||||
FREE (ttok);
|
||||
dollar_present = all_digit_token = 0;
|
||||
goto next_character;
|
||||
}
|
||||
#endif /* COND_REGEXP */
|
||||
|
||||
#ifdef EXTENDED_GLOB
|
||||
/* Parse a ksh-style extended pattern matching specification. */
|
||||
if (extended_glob && PATTERN_CHAR (character))
|
||||
if MBTEST(extended_glob && PATTERN_CHAR (character))
|
||||
{
|
||||
peek_char = shell_getc (1);
|
||||
if MBTEST(peek_char == '(') /* ) */
|
||||
|
||||
+4948
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,24 @@
|
||||
#ifdef COND_REGEXP
|
||||
/* When parsing a regexp as a single word inside a conditional command,
|
||||
we need to special-case characters special to both the shell and
|
||||
regular expressions. Right now, that is only '(' and '|'. */ /*)*/
|
||||
if MBTEST((parser_state & PST_REGEXP) && (character == '(' || character == '|')) /*)*/
|
||||
{
|
||||
if (character == '|')
|
||||
goto got_character;
|
||||
|
||||
push_delimiter (dstack, character);
|
||||
ttok = parse_matched_pair (cd, '(', ')', &ttoklen, 0);
|
||||
pop_delimiter (dstack);
|
||||
if (ttok == &matched_pair_error)
|
||||
return -1; /* Bail immediately. */
|
||||
RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 2,
|
||||
token_buffer_size, TOKEN_DEFAULT_GROW_SIZE);
|
||||
token[token_index++] = character;
|
||||
strcpy (token + token_index, ttok);
|
||||
token_index += ttoklen;
|
||||
FREE (ttok);
|
||||
dollar_present = all_digit_token = 0;
|
||||
goto next_character;
|
||||
}
|
||||
#endif /* COND_REGEXP */
|
||||
+4981
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -125,7 +125,7 @@ freebsd2* | netbsd*)
|
||||
|
||||
# FreeBSD-3.x ELF
|
||||
freebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*|dragonfly*)
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
SHOBJ_CFLAGS=-fPIC
|
||||
SHOBJ_LD='${CC}'
|
||||
|
||||
if [ -x /usr/bin/objformat ] && [ "`/usr/bin/objformat`" = "elf" ]; then
|
||||
|
||||
@@ -79,5 +79,5 @@ show_shell_version (extended)
|
||||
{
|
||||
printf ("GNU bash, version %s (%s)\n", shell_version_string (), MACHTYPE);
|
||||
if (extended)
|
||||
printf (_("Copyright (C) 2005 Free Software Foundation, Inc.\n"));
|
||||
printf (_("Copyright (C) 2006 Free Software Foundation, Inc.\n"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user