commit bash-20041230 snapshot

This commit is contained in:
Chet Ramey
2011-12-03 13:41:51 -05:00
parent 5c96a638d0
commit 01ed5ba4e7
36 changed files with 4623 additions and 2903 deletions
+42
View File
@@ -10726,3 +10726,45 @@ doc/{bash.1,bashref.texi}
- changed text in quoting section explaining that double quotes do
not prevent history expansion from taking place, and that backslashes
escaping ! are not removed
12/28
-----
shell.c
- set gnu_error_format to 1 if running under emacs. This should allow
the emacs `next-error' stuff to work, at least for interactive shells
parse.y
- change yy_stream_get to set interrupt_immediately before calling
getc_with_restart when the shell is interactive. This avoids the
synchronization problem caused by the call to QUIT in read_a_line,
which results in the first character after a SIGINT/^C to be
dropped
12/30
-----
builtins/mkbuiltins.c
- changes to write long documentation to arrays as a single string by
default, rather than an array of strings -- enabled by default
- new option, -S, to restore old behavior of writing multiple strings
for long documentation
- changes to avoid filenames written when the separate-filenames option
(-H) has been supplied being run through gettext
configure.in
- new cofiguration option, --enable-single-help-strings (on by default),
causes help text to be stored as a single string (or smaller set than
one string per line)
builtins/Makefile.in
- pass `-S' to mkbuiltins if single-help-strings is turned off
doc/bashref.texi
- documented new `single-help-strings' configure option
1/3/2005
--------
jobs.c
- make wait_for return a non-zero status if the job or processed
waited for is suspended. Returns 128 + stop signal. This fixes
the problem with `echo one && sleep 5 && echo two' displaying
`two' after the sleep is suspended
+46
View File
@@ -10714,3 +10714,49 @@ subst.c
string over and over again when doing word splitting (that kills if
it's a long string)
12/18
-----
subst.c
- in string_list_dollar_star, make sure to null-terminate the
separator if the character is longer than one byte
12/22
-----
doc/{bash.1,bashref.texi}
- changed text in quoting section explaining that double quotes do
not prevent history expansion from taking place, and that backslashes
escaping ! are not removed
12/28
-----
shell.c
- set gnu_error_format to 1 if running under emacs. This should allow
the emacs `next-error' stuff to work, at least for interactive shells
parse.y
- change yy_stream_get to set interrupt_immediately before calling
getc_with_restart when the shell is interactive. This avoids the
synchronization problem caused by the call to QUIT in read_a_line,
which results in the first character after a SIGINT/^C to be
dropped
12/30
-----
builtins/mkbuiltins.c
- changes to write long documentation to arrays as a single string by
default, rather than an array of strings -- enabled by default
- new option, -S, to restore old behavior of writing multiple strings
for long documentation
- changes to avoid filenames written when the separate-filenames option
(-H) has been supplied being run through gettext
configure.in
- new cofiguration option, --enable-single-help-strings (on by default),
causes help text to be stored as a single string (or smaller set than
one string per line)
builtins/Makefile.in
- pass `-S' to mkbuiltins if single-help-strings is turned off
doc/bashref.texi
- documented new `single-help-strings' configure option
+17 -2
View File
@@ -1,5 +1,5 @@
@%:@! /bin/sh
@%:@ From configure.in for Bash 3.0, version 3.171, from autoconf version AC_ACVERSION.
@%:@ From configure.in for Bash 3.0, version 3.172, from autoconf version AC_ACVERSION.
@%:@ Guess values for system-dependent variables and create Makefiles.
@%:@ Generated by GNU Autoconf 2.57 for bash 3.1-devel.
@%:@
@@ -311,7 +311,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os EMACS lispdir DEBUGGER_START_FILE TESTSCRIPT PURIFY MALLOC_TARGET MALLOC_SRC MALLOC_LIB MALLOC_LIBRARY MALLOC_LDFLAGS MALLOC_DEP htmldir HELPDIR HELPDIRDEFINE HELPINSTALL CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP SIGNAMES_H CC_FOR_BUILD STATIC_LD CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD LDFLAGS_FOR_BUILD RL_VERSION RL_MAJOR RL_MINOR READLINE_LIB READLINE_DEP RL_LIBDIR RL_INCLUDEDIR RL_INCLUDE HISTORY_LIB HISTORY_DEP HIST_LIBDIR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AR RANLIB ac_ct_RANLIB YACC SET_MAKE MAKE_SHELL MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE ALLOCA GLIBC21 LIBICONV LTLIBICONV INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB LIB@&t@OBJS INTL_DEP INTL_INC LIBINTL_H SIGLIST_O TERMCAP_LIB TERMCAP_DEP JOBS_O SHOBJ_CC SHOBJ_CFLAGS SHOBJ_LD SHOBJ_LDFLAGS SHOBJ_XLDFLAGS SHOBJ_LIBS SHOBJ_STATUS PROFILE_FLAGS incdir BUILD_DIR ARFLAGS BASHVERS RELSTATUS DEBUG MALLOC_DEBUG LOCAL_LIBS LOCAL_CFLAGS LOCAL_LDFLAGS LOCAL_DEFS LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os EMACS lispdir DEBUGGER_START_FILE TESTSCRIPT PURIFY MALLOC_TARGET MALLOC_SRC MALLOC_LIB MALLOC_LIBRARY MALLOC_LDFLAGS MALLOC_DEP htmldir HELPDIR HELPDIRDEFINE HELPINSTALL HELPSTRINGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP SIGNAMES_H CC_FOR_BUILD STATIC_LD CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD LDFLAGS_FOR_BUILD RL_VERSION RL_MAJOR RL_MINOR READLINE_LIB READLINE_DEP RL_LIBDIR RL_INCLUDEDIR RL_INCLUDE HISTORY_LIB HISTORY_DEP HIST_LIBDIR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AR RANLIB ac_ct_RANLIB YACC SET_MAKE MAKE_SHELL MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE ALLOCA GLIBC21 LIBICONV LTLIBICONV INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB LIB@&t@OBJS INTL_DEP INTL_INC LIBINTL_H SIGLIST_O TERMCAP_LIB TERMCAP_DEP JOBS_O SHOBJ_CC SHOBJ_CFLAGS SHOBJ_LD SHOBJ_LDFLAGS SHOBJ_XLDFLAGS SHOBJ_LIBS SHOBJ_STATUS PROFILE_FLAGS incdir BUILD_DIR ARFLAGS BASHVERS RELSTATUS DEBUG MALLOC_DEBUG LOCAL_LIBS LOCAL_CFLAGS LOCAL_LDFLAGS LOCAL_DEFS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -890,6 +890,9 @@ Optional Features:
--enable-select include select command
--enable-separate-helpfiles
use external files for help builtin documentation
--enable-single-help-strings
store help documentation as a single string to ease
translation
--enable-usg-echo-default
a synonym for --enable-xpg-echo-default
--enable-xpg-echo-default
@@ -1686,6 +1689,7 @@ opt_progcomp=yes
opt_separate_help=no
opt_multibyte=yes
opt_debugger=yes
opt_single_longdoc_strings=yes
opt_static_link=no
opt_profiling=no
@@ -1832,6 +1836,11 @@ if test "${enable_separate_helpfiles+set}" = set; then
enableval="$enable_separate_helpfiles"
opt_separate_help=$enableval
fi;
# Check whether --enable-single-help-strings or --disable-single-help-strings was given.
if test "${enable_single_help_strings+set}" = set; then
enableval="$enable_single_help_strings"
opt_single_longdoc_strings=$enableval
fi;
# Check whether --enable-usg-echo-default or --disable-usg-echo-default was given.
if test "${enable_usg_echo_default+set}" = set; then
enableval="$enable_usg_echo_default"
@@ -2011,6 +2020,11 @@ if test "$opt_separate_help" != no; then
HELPDIRDEFINE='-H ${HELPDIR}'
HELPINSTALL='install-help'
fi
HELPSTRINGS=
if test "$opt_single_longdoc_strings" != "yes"; then
HELPSTRINGS='-S'
fi
@@ -24827,6 +24841,7 @@ s,@htmldir@,$htmldir,;t t
s,@HELPDIR@,$HELPDIR,;t t
s,@HELPDIRDEFINE@,$HELPDIRDEFINE,;t t
s,@HELPINSTALL@,$HELPINSTALL,;t t
s,@HELPSTRINGS@,$HELPSTRINGS,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
+85 -85
View File
@@ -15,96 +15,96 @@
'configure.in'
],
{
'AC_TYPE_SIZE_T' => 1,
'AC_TYPE_MODE_T' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'AC_PROG_LEX' => 1,
'AC_CONFIG_FILES' => 1,
'AC_STRUCT_TIMEZONE' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_TYPE_PID_T' => 1,
'AC_CHECK_LIB' => 1,
'AC_HEADER_SYS_WAIT' => 1,
'AC_HEADER_DIRENT' => 1,
'AC_FUNC_VPRINTF' => 1,
'AC_FUNC_FORK' => 1,
'AC_FUNC_GETPGRP' => 1,
'include' => 1,
'AC_FUNC_STRERROR_R' => 1,
'AC_LIBSOURCE' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AC_FUNC_SETPGRP' => 1,
'AC_PROG_LN_S' => 1,
'AM_GNU_GETTEXT' => 1,
'AC_HEADER_MAJOR' => 1,
'm4_pattern_forbid' => 1,
'AC_FUNC_GETLOADAVG' => 1,
'AC_FUNC_STRCOLL' => 1,
'AM_PROG_CC_C_O' => 1,
'AC_PROG_LIBTOOL' => 1,
'AC_FUNC_UTIME_NULL' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'AC_FUNC_ERROR_AT_LINE' => 1,
'AC_CHECK_TYPES' => 1,
'AM_MAINTAINER_MODE' => 1,
'AC_FUNC_GETMNTENT' => 1,
'AC_STRUCT_TM' => 1,
'AC_FUNC_SELECT_ARGTYPES' => 1,
'AC_STRUCT_ST_BLOCKS' => 1,
'AC_PROG_CXX' => 1,
'AC_PATH_X' => 1,
'AC_PROG_INSTALL' => 1,
'AC_FUNC_SETVBUF_REVERSED' => 1,
'AC_HEADER_STDC' => 1,
'AH_OUTPUT' => 1,
'AC_FUNC_STRFTIME' => 1,
'AC_FUNC_MALLOC' => 1,
'AC_TYPE_SIGNAL' => 1,
'AC_PROG_YACC' => 1,
'AC_C_VOLATILE' => 1,
'AC_PROG_CPP' => 1,
'AC_INIT' => 1,
'm4_include' => 1,
'AC_HEADER_TIME' => 1,
'AC_FUNC_LSTAT' => 1,
'AC_FUNC_CHOWN' => 1,
'AC_TYPE_UID_T' => 1,
'AC_DECL_SYS_SIGLIST' => 1,
'AC_FUNC_MKTIME' => 1,
'AC_FUNC_MBRTOWC' => 1,
'AC_C_INLINE' => 1,
'AC_FUNC_REALLOC' => 1,
'AC_FUNC_STRNLEN' => 1,
'AC_PROG_CC' => 1,
'm4_pattern_allow' => 1,
'AC_PROG_AWK' => 1,
'AC_CHECK_MEMBERS' => 1,
'AC_FUNC_WAIT3' => 1,
'AC_C_CONST' => 1,
'AC_FUNC_MEMCMP' => 1,
'AC_PROG_RANLIB' => 1,
'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
'AC_C_VOLATILE' => 1,
'AC_HEADER_STDC' => 1,
'm4_pattern_forbid' => 1,
'AC_INIT' => 1,
'AC_FUNC_MALLOC' => 1,
'AC_FUNC_SETVBUF_REVERSED' => 1,
'AC_TYPE_MODE_T' => 1,
'AC_FUNC_STRCOLL' => 1,
'AC_CONFIG_FILES' => 1,
'include' => 1,
'AC_HEADER_MAJOR' => 1,
'AC_CANONICAL_HOST' => 1,
'AC_CHECK_MEMBERS' => 1,
'AC_PROG_LIBTOOL' => 1,
'AC_PROG_AWK' => 1,
'AM_CONDITIONAL' => 1,
'AC_FUNC_MMAP' => 1,
'AC_FUNC_GETGROUPS' => 1,
'AC_HEADER_STAT' => 1,
'AC_PROG_MAKE_SET' => 1,
'AC_FUNC_CLOSEDIR_VOID' => 1,
'AC_FUNC_FSEEKO' => 1,
'AC_FUNC_OBSTACK' => 1,
'AC_CHECK_HEADERS' => 1,
'AC_FUNC_STRTOD' => 1,
'AC_TYPE_OFF_T' => 1,
'AC_SUBST' => 1,
'AC_CHECK_FUNCS' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'AC_REPLACE_FNMATCH' => 1,
'AC_PROG_CC' => 1,
'AC_FUNC_SETPGRP' => 1,
'AC_TYPE_PID_T' => 1,
'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
'AC_FUNC_MKTIME' => 1,
'AC_FUNC_UTIME_NULL' => 1,
'AC_FUNC_WAIT3' => 1,
'AC_C_INLINE' => 1,
'AC_FUNC_STAT' => 1,
'AC_FUNC_ALLOCA' => 1,
'AC_STRUCT_ST_BLOCKS' => 1,
'AC_CHECK_HEADERS' => 1,
'AM_MAINTAINER_MODE' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_FUNC_MMAP' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'AC_FUNC_CLOSEDIR_VOID' => 1,
'AC_LIBSOURCE' => 1,
'AC_SUBST' => 1,
'AC_FUNC_STRFTIME' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'AC_FUNC_GETMNTENT' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'AC_PROG_YACC' => 1,
'AC_FUNC_VPRINTF' => 1,
'AC_FUNC_REALLOC' => 1,
'AC_TYPE_UID_T' => 1,
'AC_FUNC_GETLOADAVG' => 1,
'AC_CHECK_FUNCS' => 1,
'AC_PROG_LN_S' => 1,
'AC_FUNC_STRNLEN' => 1,
'AC_HEADER_SYS_WAIT' => 1,
'AC_DECL_SYS_SIGLIST' => 1,
'AC_FUNC_MBRTOWC' => 1,
'AC_FUNC_OBSTACK' => 1,
'AC_HEADER_DIRENT' => 1,
'AC_REPLACE_FNMATCH' => 1,
'AC_FUNC_SELECT_ARGTYPES' => 1,
'AC_PROG_CPP' => 1,
'AC_PROG_GCC_TRADITIONAL' => 1,
'AC_CANONICAL_HOST' => 1
'AC_PROG_CXX' => 1,
'AC_HEADER_TIME' => 1,
'AC_FUNC_GETPGRP' => 1,
'AC_PROG_LEX' => 1,
'm4_pattern_allow' => 1,
'AC_FUNC_FSEEKO' => 1,
'AC_PROG_MAKE_SET' => 1,
'AC_FUNC_ERROR_AT_LINE' => 1,
'AM_PROG_CC_C_O' => 1,
'AC_STRUCT_TIMEZONE' => 1,
'AC_FUNC_FORK' => 1,
'AC_FUNC_GETGROUPS' => 1,
'AM_GNU_GETTEXT' => 1,
'AC_FUNC_STRERROR_R' => 1,
'AC_FUNC_LSTAT' => 1,
'AC_TYPE_SIZE_T' => 1,
'AC_PATH_X' => 1,
'AC_PROG_RANLIB' => 1,
'AC_HEADER_STAT' => 1,
'AC_CHECK_TYPES' => 1,
'AC_STRUCT_TM' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AC_FUNC_CHOWN' => 1,
'AC_TYPE_OFF_T' => 1,
'AC_C_CONST' => 1,
'AC_FUNC_ALLOCA' => 1,
'AH_OUTPUT' => 1,
'AC_PROG_INSTALL' => 1,
'AC_FUNC_STRTOD' => 1,
'AC_TYPE_SIGNAL' => 1,
'm4_include' => 1
}
], 'Request' )
);
+746 -745
View File
File diff suppressed because it is too large Load Diff
+287
View File
@@ -0,0 +1,287 @@
*** ../bash-2.05b-patched/builtins/common.c Fri Jun 28 12:24:31 2002
--- builtins/common.c Thu Sep 30 22:25:20 2004
***************
*** 455,464 ****
{
char *directory;
if (no_symbolic_links)
{
! if (the_current_working_directory)
! free (the_current_working_directory);
!
the_current_working_directory = (char *)NULL;
}
--- 469,477 ----
{
char *directory;
+ size_t dsize;
if (no_symbolic_links)
{
! FREE (the_current_working_directory);
the_current_working_directory = (char *)NULL;
}
***************
*** 466,480 ****
if (the_current_working_directory == 0)
{
! the_current_working_directory = (char *)xmalloc (PATH_MAX);
! the_current_working_directory[0] = '\0';
! directory = getcwd (the_current_working_directory, PATH_MAX);
! if (directory == 0)
{
! fprintf (stderr, "%s: could not get current directory: %s: %s\n",
(for_whom && *for_whom) ? for_whom : get_name_for_error (),
! bash_getcwd_errstr, strerror (errno));
!
! free (the_current_working_directory);
! the_current_working_directory = (char *)NULL;
return (char *)NULL;
}
--- 479,488 ----
if (the_current_working_directory == 0)
{
! the_current_working_directory = getcwd (0, 0);
! if (the_current_working_directory == 0)
{
! fprintf (stderr, _("%s: error retrieving current directory: %s: %s\n"),
(for_whom && *for_whom) ? for_whom : get_name_for_error (),
! _(bash_getcwd_errstr), strerror (errno));
return (char *)NULL;
}
*** ../bash-2.05b-patched/builtins/cd.def Mon Jul 15 14:51:39 2002
--- builtins/cd.def Sun Nov 7 15:13:42 2004
***************
*** 122,126 ****
the_current_working_directory () */
static char *
! resetpwd ()
{
char *tdir;
--- 124,129 ----
the_current_working_directory () */
static char *
! resetpwd (caller)
! char *caller;
{
char *tdir;
***************
*** 128,132 ****
FREE (the_current_working_directory);
the_current_working_directory = (char *)NULL;
! tdir = get_working_directory ("cd");
return (tdir);
}
--- 131,135 ----
FREE (the_current_working_directory);
the_current_working_directory = (char *)NULL;
! tdir = get_working_directory (caller);
return (tdir);
}
***************
*** 333,336 ****
--- 340,349 ----
directory = tcwd ? (verbatim_pwd ? sh_physpath (tcwd, 0) : tcwd)
: get_working_directory ("pwd");
+
+ /* Try again using getcwd() if canonicalization fails (for instance, if
+ the file system has changed state underneath bash). */
+ if (tcwd && directory == 0)
+ directory = resetpwd ("pwd");
+
#undef tcwd
***************
*** 364,368 ****
{
char *t, *tdir;
! int err, canon_failed;
tdir = (char *)NULL;
--- 379,383 ----
{
char *t, *tdir;
! int err, canon_failed, r;
tdir = (char *)NULL;
***************
*** 399,403 ****
if (posixly_correct && nolinks == 0 && canon_failed)
{
! errno = ENOENT;
return (0);
}
--- 414,423 ----
if (posixly_correct && nolinks == 0 && canon_failed)
{
! #if defined ENAMETOOLONG
! if (errno != ENOENT && errno != ENAMETOOLONG)
! #else
! if (errno != ENOENT)
! #endif
! errno = ENOTDIR;
return (0);
}
***************
*** 409,418 ****
shell's idea of the_current_working_directory. */
if (canon_failed)
- resetpwd ();
- else
{
! FREE (the_current_working_directory);
! the_current_working_directory = tdir;
}
return (1);
--- 429,439 ----
shell's idea of the_current_working_directory. */
if (canon_failed)
{
! t = resetpwd ("cd");
! if (t == 0)
! set_working_directory (tdir);
}
+ else
+ set_working_directory (tdir);
return (1);
***************
*** 425,429 ****
err = errno;
- free (tdir);
/* We're not in physical mode (nolinks == 0), but we failed to change to
--- 446,449 ----
***************
*** 432,445 ****
if (chdir (newdir) == 0)
{
! tdir = resetpwd ();
! FREE (tdir);
! return (1);
}
else
{
errno = err;
! return (0);
}
}
--- 452,471 ----
if (chdir (newdir) == 0)
{
! t = resetpwd ("cd");
! if (t == 0)
! set_working_directory (tdir);
! else
! free (t);
! r = 1;
}
else
{
errno = err;
! r = 0;
}
+
+ free (tdir);
+ return r;
}
*** ../bash-2.05b-patched/aclocal.m4 Tue Jun 25 09:45:43 2002
--- aclocal.m4 Sat Oct 9 15:03:28 2004
***************
*** 686,691 ****
AC_DEFUN(BASH_FUNC_GETCWD,
! [AC_MSG_CHECKING([if getcwd() calls popen()])
! AC_CACHE_VAL(bash_cv_getcwd_calls_popen,
[AC_TRY_RUN([
#include <stdio.h>
--- 686,691 ----
AC_DEFUN(BASH_FUNC_GETCWD,
! [AC_MSG_CHECKING([if getcwd() will dynamically allocate memory])
! AC_CACHE_VAL(bash_cv_getcwd_malloc,
[AC_TRY_RUN([
#include <stdio.h>
***************
*** 694,748 ****
#endif
- #ifndef __STDC__
- #ifndef const
- #define const
- #endif
- #endif
-
- int popen_called;
-
- FILE *
- popen(command, type)
- const char *command;
- const char *type;
- {
- popen_called = 1;
- return (FILE *)NULL;
- }
-
- FILE *_popen(command, type)
- const char *command;
- const char *type;
- {
- return (popen (command, type));
- }
-
- int
- pclose(stream)
- FILE *stream;
- {
- return 0;
- }
-
- int
- _pclose(stream)
- FILE *stream;
- {
- return 0;
- }
-
main()
{
! char lbuf[32];
! popen_called = 0;
! getcwd(lbuf, 32);
! exit (popen_called);
}
! ], bash_cv_getcwd_calls_popen=no, bash_cv_getcwd_calls_popen=yes,
! [AC_MSG_WARN(cannot check whether getcwd calls popen if cross compiling -- defaulting to no)
! bash_cv_getcwd_calls_popen=no]
)])
! AC_MSG_RESULT($bash_cv_getcwd_calls_popen)
! if test $bash_cv_getcwd_calls_popen = yes; then
AC_DEFINE(GETCWD_BROKEN)
AC_LIBOBJ(getcwd)
--- 694,709 ----
#endif
main()
{
! char *xpwd;
! xpwd = getcwd(0, 0);
! exit (xpwd == 0);
}
! ], bash_cv_getcwd_malloc=yes, bash_cv_getcwd_malloc=no,
! [AC_MSG_WARN(cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no)
! bash_cv_getcwd_malloc=no]
)])
! AC_MSG_RESULT($bash_cv_getcwd_malloc)
! if test $bash_cv_getcwd_malloc = no; then
AC_DEFINE(GETCWD_BROKEN)
AC_LIBOBJ(getcwd)
+2
View File
@@ -41,6 +41,8 @@
#define SPECIAL_BUILTIN 0x8 /* This is a Posix `special' builtin. */
#define ASSIGNMENT_BUILTIN 0x10 /* This builtin takes assignment statements. */
#define BASE_INDENT 4
/* The thing that we build the array of builtins out of. */
struct builtin {
char *name; /* The name that the user types. */
+2 -1
View File
@@ -96,6 +96,7 @@ GCC_LINT_FLAGS = -Wall -Wshadow -Wpointer-arith -Wcast-qual \
MKBUILTINS = mkbuiltins$(EXEEXT)
DIRECTDEFINE = -D $(srcdir)
HELPDIRDEFINE = @HELPDIRDEFINE@
HELPSTRINGS = @HELPSTRINGS@
# xxx this is bad style
RL_LIBSRC = $(topdir)/lib/readline
@@ -160,7 +161,7 @@ builtext.h builtins.c: $(MKBUILTINS) $(DEFSRC)
@-if test -f builtins.c; then mv -f builtins.c old-builtins.c; fi
@-if test -f builtext.h; then mv -f builtext.h old-builtext.h; fi
./$(MKBUILTINS) -externfile builtext.h -structfile builtins.c \
-noproduction $(DIRECTDEFINE) $(HELPDIRDEFINE) $(DEFSRC)
-noproduction $(DIRECTDEFINE) $(HELPDIRDEFINE) $(HELPSTRINGS) $(DEFSRC)
@-if cmp -s old-builtext.h builtext.h 2>/dev/null; then \
mv old-builtext.h builtext.h; \
else \
+1 -1
View File
@@ -169,7 +169,7 @@ show_longdoc (i)
}
else
for (j = 0; doc[j]; j++)
printf (" %s\n", _(doc[j]));
printf ("%*s%s\n", BASE_INDENT, " ", _(doc[j]));
}
static void
+70 -15
View File
@@ -63,6 +63,8 @@ extern char *strcpy ();
#define BUILTIN_FLAG_SPECIAL 0x01
#define BUILTIN_FLAG_ASSIGNMENT 0x02
#define BASE_INDENT 4
/* If this stream descriptor is non-zero, then write
texinfo documentation to it. */
FILE *documentation_file = (FILE *)NULL;
@@ -77,6 +79,10 @@ int inhibit_production = 0;
the builtin name, in `./helpfiles'. */
int separate_helpfiles = 0;
/* Non-zero means to create single C strings for each `longdoc', with
embedded newlines, for ease of translation. */
int single_longdoc_strings = 1;
/* The name of a directory into which the separate external help files will
eventually be installed. */
char *helpfile_directory;
@@ -225,6 +231,8 @@ main (argc, argv)
separate_helpfiles = 1;
helpfile_directory = argv[arg_index++];
}
else if (strcmp (arg, "-S") == 0)
single_longdoc_strings = 0;
else
{
fprintf (stderr, "%s: Unknown flag %s.\n", argv[0], arg);
@@ -1058,9 +1066,10 @@ save_builtin (builtin)
}
/* Flags that mean something to write_documentation (). */
#define STRING_ARRAY 1
#define TEXINFO 2
#define PLAINTEXT 4
#define STRING_ARRAY 0x01
#define TEXINFO 0x02
#define PLAINTEXT 0x04
#define HELPFILE 0x08
char *structfile_header[] = {
"/* builtins.c -- the built in shell commands. */",
@@ -1271,7 +1280,7 @@ write_longdocs (stream, builtins)
sarray[0] = (char *)xmalloc (l + 1);
sprintf (sarray[0], "%s/%s", helpfile_directory, dname);
sarray[1] = (char *)NULL;
write_documentation (stream, sarray, 0, STRING_ARRAY);
write_documentation (stream, sarray, 0, STRING_ARRAY|HELPFILE);
free (sarray[0]);
}
else
@@ -1343,8 +1352,10 @@ write_endifs (stream, defines)
fprintf (stream, " */\n");
}
/* Write DOCUMENTAION to STREAM, perhaps surrounding it with double-quotes
and quoting special characters in the string. */
/* Write DOCUMENTATION to STREAM, perhaps surrounding it with double-quotes
and quoting special characters in the string. Handle special things for
internationalization (gettext) and the single-string vs. multiple-strings
issues. */
void
write_documentation (stream, documentation, indentation, flags)
FILE *stream;
@@ -1353,33 +1364,59 @@ write_documentation (stream, documentation, indentation, flags)
{
register int i, j;
register char *line;
int string_array, texinfo;
int string_array, texinfo, base_indent, last_cpp, filename_p;
if (!stream)
return;
string_array = flags & STRING_ARRAY;
if (string_array)
fprintf (stream, " {\n#if defined (HELP_BUILTIN)\n");
filename_p = flags & HELPFILE;
for (i = 0, texinfo = (flags & TEXINFO); line = documentation[i]; i++)
if (string_array)
{
/* Allow #ifdef's to be written out verbatim. */
fprintf (stream, " {\n#if defined (HELP_BUILTIN)\n"); /* } */
if (single_longdoc_strings)
{
if (filename_p == 0)
fprintf (stream, "N_(\"");
else
fprintf (stream, "\"");
}
}
base_indent = (string_array && single_longdoc_strings && filename_p == 0) ? BASE_INDENT : 0;
for (i = last_cpp = 0, texinfo = (flags & TEXINFO); line = documentation[i]; i++)
{
/* Allow #ifdef's to be written out verbatim, but don't put them into
separate help files. */
if (*line == '#')
{
if (string_array)
if (string_array && filename_p == 0 && single_longdoc_strings == 0)
fprintf (stream, "%s\n", line);
last_cpp = 1;
continue;
}
else
last_cpp = 0;
/* prefix with N_( for gettext */
if (string_array)
fprintf (stream, " N_(\"");
if (string_array && single_longdoc_strings == 0)
{
if (filename_p == 0)
fprintf (stream, " N_(\"");
else
fprintf (stream, " \"");
}
if (indentation)
for (j = 0; j < indentation; j++)
fprintf (stream, " ");
/* Don't indent the first line, because of how the help builtin works. */
if (i == 0)
indentation += base_indent;
if (string_array)
{
for (j = 0; line[j]; j++)
@@ -1397,7 +1434,16 @@ write_documentation (stream, documentation, indentation, flags)
}
/* closing right paren for gettext */
fprintf (stream, "\"),\n");
if (single_longdoc_strings == 0)
{
if (filename_p == 0)
fprintf (stream, "\"),\n");
else
fprintf (stream, "\",\n");
}
else if (documentation[i+1])
/* don't add extra newline after last line */
fprintf (stream, "\\n\\\n");
}
else if (texinfo)
{
@@ -1421,6 +1467,15 @@ write_documentation (stream, documentation, indentation, flags)
fprintf (stream, "%s\n", line);
}
/* closing right paren for gettext */
if (string_array && single_longdoc_strings)
{
if (filename_p == 0)
fprintf (stream, "\"),\n");
else
fprintf (stream, "\",\n");
}
if (string_array)
fprintf (stream, "#endif /* HELP_BUILTIN */\n (char *)NULL\n};\n");
}
Vendored
+17 -2
View File
@@ -1,5 +1,5 @@
#! /bin/sh
# From configure.in for Bash 3.0, version 3.171, from autoconf version AC_ACVERSION.
# From configure.in for Bash 3.0, version 3.172, from autoconf version AC_ACVERSION.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.57 for bash 3.1-devel.
#
@@ -311,7 +311,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os EMACS lispdir DEBUGGER_START_FILE TESTSCRIPT PURIFY MALLOC_TARGET MALLOC_SRC MALLOC_LIB MALLOC_LIBRARY MALLOC_LDFLAGS MALLOC_DEP htmldir HELPDIR HELPDIRDEFINE HELPINSTALL CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP SIGNAMES_H CC_FOR_BUILD STATIC_LD CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD LDFLAGS_FOR_BUILD RL_VERSION RL_MAJOR RL_MINOR READLINE_LIB READLINE_DEP RL_LIBDIR RL_INCLUDEDIR RL_INCLUDE HISTORY_LIB HISTORY_DEP HIST_LIBDIR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AR RANLIB ac_ct_RANLIB YACC SET_MAKE MAKE_SHELL MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE ALLOCA GLIBC21 LIBICONV LTLIBICONV INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB LIBOBJS INTL_DEP INTL_INC LIBINTL_H SIGLIST_O TERMCAP_LIB TERMCAP_DEP JOBS_O SHOBJ_CC SHOBJ_CFLAGS SHOBJ_LD SHOBJ_LDFLAGS SHOBJ_XLDFLAGS SHOBJ_LIBS SHOBJ_STATUS PROFILE_FLAGS incdir BUILD_DIR ARFLAGS BASHVERS RELSTATUS DEBUG MALLOC_DEBUG LOCAL_LIBS LOCAL_CFLAGS LOCAL_LDFLAGS LOCAL_DEFS LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os EMACS lispdir DEBUGGER_START_FILE TESTSCRIPT PURIFY MALLOC_TARGET MALLOC_SRC MALLOC_LIB MALLOC_LIBRARY MALLOC_LDFLAGS MALLOC_DEP htmldir HELPDIR HELPDIRDEFINE HELPINSTALL HELPSTRINGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP SIGNAMES_H CC_FOR_BUILD STATIC_LD CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD LDFLAGS_FOR_BUILD RL_VERSION RL_MAJOR RL_MINOR READLINE_LIB READLINE_DEP RL_LIBDIR RL_INCLUDEDIR RL_INCLUDE HISTORY_LIB HISTORY_DEP HIST_LIBDIR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AR RANLIB ac_ct_RANLIB YACC SET_MAKE MAKE_SHELL MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE ALLOCA GLIBC21 LIBICONV LTLIBICONV INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB LIBOBJS INTL_DEP INTL_INC LIBINTL_H SIGLIST_O TERMCAP_LIB TERMCAP_DEP JOBS_O SHOBJ_CC SHOBJ_CFLAGS SHOBJ_LD SHOBJ_LDFLAGS SHOBJ_XLDFLAGS SHOBJ_LIBS SHOBJ_STATUS PROFILE_FLAGS incdir BUILD_DIR ARFLAGS BASHVERS RELSTATUS DEBUG MALLOC_DEBUG LOCAL_LIBS LOCAL_CFLAGS LOCAL_LDFLAGS LOCAL_DEFS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -890,6 +890,9 @@ Optional Features:
--enable-select include select command
--enable-separate-helpfiles
use external files for help builtin documentation
--enable-single-help-strings
store help documentation as a single string to ease
translation
--enable-usg-echo-default
a synonym for --enable-xpg-echo-default
--enable-xpg-echo-default
@@ -1686,6 +1689,7 @@ opt_progcomp=yes
opt_separate_help=no
opt_multibyte=yes
opt_debugger=yes
opt_single_longdoc_strings=yes
opt_static_link=no
opt_profiling=no
@@ -1832,6 +1836,11 @@ if test "${enable_separate_helpfiles+set}" = set; then
enableval="$enable_separate_helpfiles"
opt_separate_help=$enableval
fi;
# Check whether --enable-single-help-strings or --disable-single-help-strings was given.
if test "${enable_single_help_strings+set}" = set; then
enableval="$enable_single_help_strings"
opt_single_longdoc_strings=$enableval
fi;
# Check whether --enable-usg-echo-default or --disable-usg-echo-default was given.
if test "${enable_usg_echo_default+set}" = set; then
enableval="$enable_usg_echo_default"
@@ -2011,6 +2020,11 @@ if test "$opt_separate_help" != no; then
HELPDIRDEFINE='-H ${HELPDIR}'
HELPINSTALL='install-help'
fi
HELPSTRINGS=
if test "$opt_single_longdoc_strings" != "yes"; then
HELPSTRINGS='-S'
fi
@@ -24827,6 +24841,7 @@ s,@htmldir@,$htmldir,;t t
s,@HELPDIR@,$HELPDIR,;t t
s,@HELPDIRDEFINE@,$HELPDIRDEFINE,;t t
s,@HELPINSTALL@,$HELPINSTALL,;t t
s,@HELPSTRINGS@,$HELPSTRINGS,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
+8 -1
View File
@@ -22,7 +22,7 @@ dnl Process this file with autoconf to produce a configure script.
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
AC_REVISION([for Bash 3.0, version 3.171, from autoconf version] AC_ACVERSION)dnl
AC_REVISION([for Bash 3.0, version 3.172, from autoconf version] AC_ACVERSION)dnl
define(bashvers, 3.1)
define(relstatus, devel)
@@ -181,6 +181,7 @@ opt_progcomp=yes
opt_separate_help=no
opt_multibyte=yes
opt_debugger=yes
opt_single_longdoc_strings=yes
dnl options that affect how bash is compiled and linked
opt_static_link=no
@@ -227,6 +228,7 @@ AC_ARG_ENABLE(readline, AC_HELP_STRING([--enable-readline], [turn on command lin
AC_ARG_ENABLE(restricted, AC_HELP_STRING([--enable-restricted], [enable a restricted shell]), opt_restricted=$enableval)
AC_ARG_ENABLE(select, AC_HELP_STRING([--enable-select], [include select command]), opt_select=$enableval)
AC_ARG_ENABLE(separate-helpfiles, AC_HELP_STRING([--enable-separate-helpfiles], [use external files for help builtin documentation]), opt_separate_help=$enableval)
AC_ARG_ENABLE(single-help-strings, AC_HELP_STRING([--enable-single-help-strings], [store help documentation as a single string to ease translation]), opt_single_longdoc_strings=$enableval)
AC_ARG_ENABLE(usg-echo-default, AC_HELP_STRING([--enable-usg-echo-default], [a synonym for --enable-xpg-echo-default]), opt_xpg_echo=$enableval)
AC_ARG_ENABLE(xpg-echo-default, AC_HELP_STRING([--enable-xpg-echo-default], [make the echo builtin expand escape sequences by default]), opt_xpg_echo=$enableval)
@@ -325,6 +327,10 @@ if test "$opt_separate_help" != no; then
HELPDIRDEFINE='-H ${HELPDIR}'
HELPINSTALL='install-help'
fi
HELPSTRINGS=
if test "$opt_single_longdoc_strings" != "yes"; then
HELPSTRINGS='-S'
fi
dnl now substitute in the values generated by arguments
AC_SUBST(TESTSCRIPT)
@@ -342,6 +348,7 @@ AC_SUBST(htmldir)
AC_SUBST(HELPDIR)
AC_SUBST(HELPDIRDEFINE)
AC_SUBST(HELPINSTALL)
AC_SUBST(HELPSTRINGS)
echo ""
echo "Beginning configuration for bash-$BASHVERS-$RELSTATUS for ${host_cpu}-${host_vendor}-${host_os}"
+702 -43
View File
@@ -1,52 +1,711 @@
*** ../bash-2.05b-patched/builtins/common.c Fri Jun 28 12:24:31 2002
--- builtins/common.c Thu Sep 30 22:25:20 2004
*** ../bash-3.0-patched/variables.c Wed Sep 8 11:07:44 2004
--- variables.c Fri Nov 5 21:17:42 2004
***************
*** 455,464 ****
{
char *directory;
*** 200,204 ****
static SHELL_VAR *new_shell_variable __P((const char *));
static SHELL_VAR *make_new_variable __P((const char *, HASH_TABLE *));
! static SHELL_VAR *bind_variable_internal __P((const char *, char *, HASH_TABLE *, int));
if (no_symbolic_links)
{
! if (the_current_working_directory)
! free (the_current_working_directory);
!
the_current_working_directory = (char *)NULL;
static void free_variable_hash_data __P((PTR_T));
--- 200,204 ----
static SHELL_VAR *new_shell_variable __P((const char *));
static SHELL_VAR *make_new_variable __P((const char *, HASH_TABLE *));
! static SHELL_VAR *bind_variable_internal __P((const char *, char *, HASH_TABLE *, int, int));
static void free_variable_hash_data __P((PTR_T));
***************
*** 321,325 ****
# if 0
/* Array variables may not yet be exported. */
! else if (*string == '(' && string[1] == '[' && xstrchr (string, ')'))
{
string_length = 1;
--- 321,325 ----
# if 0
/* Array variables may not yet be exported. */
! else if (*string == '(' && string[1] == '[' && string[strlen (string) - 1] == ')')
{
string_length = 1;
***************
*** 334,338 ****
else
{
! temp_var = bind_variable (name, string);
VSETATTR (temp_var, (att_exported | att_imported));
array_needs_making = 1;
--- 334,338 ----
else
{
! temp_var = bind_variable (name, string, 0);
VSETATTR (temp_var, (att_exported | att_imported));
array_needs_making = 1;
***************
*** 351,355 ****
/* Set up initial value of $_ */
! temp_var = bind_variable ("_", dollar_vars[0]);
/* Remember this pid. */
--- 351,355 ----
/* Set up initial value of $_ */
! temp_var = bind_variable ("_", dollar_vars[0], 0);
/* Remember this pid. */
***************
*** 373,377 ****
char node_name[22];
qnx_nidtostr (getnid (), node_name, sizeof (node_name));
! temp_var = bind_variable ("NODE", node_name);
set_auto_export (temp_var);
}
--- 373,377 ----
char node_name[22];
qnx_nidtostr (getnid (), node_name, sizeof (node_name));
! temp_var = bind_variable ("NODE", node_name, 0);
set_auto_export (temp_var);
}
***************
*** 393,397 ****
/* Don't allow IFS to be imported from the environment. */
! temp_var = bind_variable ("IFS", " \t\n");
setifs (temp_var);
--- 393,397 ----
/* Don't allow IFS to be imported from the environment. */
! temp_var = bind_variable ("IFS", " \t\n", 0);
setifs (temp_var);
***************
*** 412,418 ****
/* Initialize the `getopts' stuff. */
! bind_variable ("OPTIND", "1");
getopts_reset (0);
! bind_variable ("OPTERR", "1");
sh_opterr = 1;
--- 412,418 ----
/* Initialize the `getopts' stuff. */
! bind_variable ("OPTIND", "1", 0);
getopts_reset (0);
! bind_variable ("OPTERR", "1", 0);
sh_opterr = 1;
***************
*** 423,427 ****
to it. */
name = get_bash_name ();
! temp_var = bind_variable ("BASH", name);
free (name);
--- 423,427 ----
to it. */
name = get_bash_name ();
! temp_var = bind_variable ("BASH", name, 0);
free (name);
***************
*** 433,437 ****
/* Make a variable called BASH_VERSION which contains the version info. */
! bind_variable ("BASH_VERSION", shell_version_string ());
#if defined (ARRAY_VARS)
make_vers_array ();
--- 433,437 ----
/* Make a variable called BASH_VERSION which contains the version info. */
! bind_variable ("BASH_VERSION", shell_version_string (), 0);
#if defined (ARRAY_VARS)
make_vers_array ();
***************
*** 439,443 ****
if (command_execution_string)
! bind_variable ("BASH_EXECUTION_STRING", command_execution_string);
/* Find out if we're supposed to be in Posix.2 mode via an
--- 439,443 ----
if (command_execution_string)
! bind_variable ("BASH_EXECUTION_STRING", command_execution_string, 0);
/* Find out if we're supposed to be in Posix.2 mode via an
***************
*** 557,561 ****
temp_var = find_variable ("HOME");
if (temp_var == 0)
! temp_var = bind_variable ("HOME", sh_get_home_dir ());
#if 0
VSETATTR (temp_var, att_exported);
--- 557,561 ----
temp_var = find_variable ("HOME");
if (temp_var == 0)
! temp_var = bind_variable ("HOME", sh_get_home_dir (), 0);
#if 0
VSETATTR (temp_var, att_exported);
***************
*** 575,579 ****
if (current_user.shell == 0)
get_current_user_info ();
! temp_var = bind_variable ("SHELL", current_user.shell);
}
#if 0
--- 575,579 ----
if (current_user.shell == 0)
get_current_user_info ();
! temp_var = bind_variable ("SHELL", current_user.shell, 0);
}
#if 0
***************
*** 697,701 ****
}
--- 469,477 ----
{
char *directory;
+ size_t dsize;
if (no_symbolic_links)
! temp_var = bind_variable ("SHLVL", new_level);
set_auto_export (temp_var);
}
--- 697,701 ----
}
! temp_var = bind_variable ("SHLVL", new_level, 0);
set_auto_export (temp_var);
}
***************
*** 732,736 ****
{
! FREE (the_current_working_directory);
the_current_working_directory = (char *)NULL;
set_working_directory (home_string);
! temp_var = bind_variable ("PWD", home_string);
set_auto_export (temp_var);
}
--- 732,736 ----
{
set_working_directory (home_string);
! temp_var = bind_variable ("PWD", home_string, 0);
set_auto_export (temp_var);
}
***************
*** 466,480 ****
if (the_current_working_directory == 0)
{
! the_current_working_directory = (char *)xmalloc (PATH_MAX);
! the_current_working_directory[0] = '\0';
! directory = getcwd (the_current_working_directory, PATH_MAX);
! if (directory == 0)
*** 740,744 ****
if (temp_string)
{
! fprintf (stderr, "%s: could not get current directory: %s: %s\n",
(for_whom && *for_whom) ? for_whom : get_name_for_error (),
! bash_getcwd_errstr, strerror (errno));
!
! free (the_current_working_directory);
! the_current_working_directory = (char *)NULL;
return (char *)NULL;
}
--- 479,488 ----
if (the_current_working_directory == 0)
{
! the_current_working_directory = getcwd (0, 0);
! if (the_current_working_directory == 0)
! temp_var = bind_variable ("PWD", temp_string);
set_auto_export (temp_var);
free (temp_string);
--- 740,744 ----
if (temp_string)
{
! fprintf (stderr, _("%s: error retrieving current directory: %s: %s\n"),
(for_whom && *for_whom) ? for_whom : get_name_for_error (),
! _(bash_getcwd_errstr), strerror (errno));
return (char *)NULL;
}
! temp_var = bind_variable ("PWD", temp_string, 0);
set_auto_export (temp_var);
free (temp_string);
***************
*** 749,753 ****
`environment variable' and therefore should be auto-exported.
Make a dummy invisible variable for OLDPWD, and mark it as exported. */
! temp_var = bind_variable ("OLDPWD", (char *)NULL);
VSETATTR (temp_var, (att_exported | att_invisible));
}
--- 749,753 ----
`environment variable' and therefore should be auto-exported.
Make a dummy invisible variable for OLDPWD, and mark it as exported. */
! temp_var = bind_variable ("OLDPWD", (char *)NULL, 0);
VSETATTR (temp_var, (att_exported | att_invisible));
}
***************
*** 764,768 ****
if (temp_var)
VUNSETATTR (temp_var, (att_readonly | att_exported));
! temp_var = bind_variable ("PPID", name);
VSETATTR (temp_var, (att_readonly | att_integer));
}
--- 764,768 ----
if (temp_var)
VUNSETATTR (temp_var, (att_readonly | att_exported));
! temp_var = bind_variable ("PPID", name, 0);
VSETATTR (temp_var, (att_readonly | att_integer));
}
***************
*** 778,782 ****
if (v == 0)
{
! v = bind_variable ("UID", b);
VSETATTR (v, (att_readonly | att_integer));
}
--- 778,782 ----
if (v == 0)
{
! v = bind_variable ("UID", b, 0);
VSETATTR (v, (att_readonly | att_integer));
}
***************
*** 788,792 ****
if (v == 0)
{
! v = bind_variable ("EUID", b);
VSETATTR (v, (att_readonly | att_integer));
}
--- 788,792 ----
if (v == 0)
{
! v = bind_variable ("EUID", b, 0);
VSETATTR (v, (att_readonly | att_integer));
}
***************
*** 831,838 ****
v = inttostr (lines, val, sizeof (val));
! bind_variable ("LINES", v);
v = inttostr (cols, val, sizeof (val));
! bind_variable ("COLUMNS", v);
}
--- 831,838 ----
v = inttostr (lines, val, sizeof (val));
! bind_variable ("LINES", v, 0);
v = inttostr (cols, val, sizeof (val));
! bind_variable ("COLUMNS", v, 0);
}
***************
*** 984,988 ****
do \
{ \
! v = bind_variable (var, (val)); \
v->dynamic_value = gfunc; \
v->assign_func = afunc; \
--- 984,988 ----
do \
{ \
! v = bind_variable (var, (val), 0); \
v->dynamic_value = gfunc; \
v->assign_func = afunc; \
***************
*** 1229,1233 ****
char *p;
! p = savestring (the_printed_command_except_trap);
FREE (value_cell (var));
var_setvalue (var, p);
--- 1229,1240 ----
char *p;
!
! if (the_printed_command_except_trap)
! p = savestring (the_printed_command_except_trap);
! else
! {
! p = (char *)xmalloc (1);
! p[0] = '\0';
! }
FREE (value_cell (var));
var_setvalue (var, p);
***************
*** 1420,1428 ****
# if defined (DEBUGGER)
! v = init_dynamic_array_var ("BASH_ARGC", get_self, null_array_assign, att_noassign);
! v = init_dynamic_array_var ("BASH_ARGV", get_self, null_array_assign, att_noassign);
# endif /* DEBUGGER */
! v = init_dynamic_array_var ("BASH_SOURCE", get_self, null_array_assign, att_noassign);
! v = init_dynamic_array_var ("BASH_LINENO", get_self, null_array_assign, att_noassign);
#endif
--- 1427,1435 ----
# if defined (DEBUGGER)
! v = init_dynamic_array_var ("BASH_ARGC", get_self, null_array_assign, att_noassign|att_nounset);
! v = init_dynamic_array_var ("BASH_ARGV", get_self, null_array_assign, att_noassign|att_nounset);
# endif /* DEBUGGER */
! v = init_dynamic_array_var ("BASH_SOURCE", get_self, null_array_assign, att_noassign|att_nounset);
! v = init_dynamic_array_var ("BASH_LINENO", get_self, null_array_assign, att_noassign|att_nounset);
#endif
***************
*** 1583,1587 ****
v = find_variable (name);
if (v == 0)
! v = bind_variable_internal (name, value, global_variables->table, HASH_NOSRCH);
return (v);
}
--- 1590,1594 ----
v = find_variable (name);
if (v == 0)
! v = bind_variable_internal (name, value, global_variables->table, HASH_NOSRCH, 0);
return (v);
}
***************
*** 1637,1641 ****
if (old_var == 0)
! new_var = bind_variable_internal (name, "", vc->table, HASH_NOSRCH);
else
{
--- 1644,1648 ----
if (old_var == 0)
! new_var = bind_variable_internal (name, "", vc->table, HASH_NOSRCH, 0);
else
{
***************
*** 1752,1762 ****
char *
! make_variable_value (var, value)
SHELL_VAR *var;
char *value;
{
! char *retval;
! intmax_t lval;
! int expok;
/* If this variable has had its type set to integer (via `declare -i'),
--- 1759,1770 ----
char *
! make_variable_value (var, value, flags)
SHELL_VAR *var;
char *value;
+ int flags;
{
! char *retval, *oval;
! intmax_t lval, rval;
! int expok, olen;
/* If this variable has had its type set to integer (via `declare -i'),
***************
*** 1767,1778 ****
if (integer_p (var))
{
! lval = evalexp (value, &expok);
if (expok == 0)
jump_to_top_level (DISCARD);
! retval = itos (lval);
}
else if (value)
{
! if (*value)
retval = savestring (value);
else
--- 1775,1806 ----
if (integer_p (var))
{
! if (flags & ASS_APPEND)
! {
! oval = value_cell (var);
! lval = evalexp (oval, &expok); /* ksh93 seems to do this */
! if (expok == 0)
! jump_to_top_level (DISCARD);
! }
! rval = evalexp (value, &expok);
if (expok == 0)
jump_to_top_level (DISCARD);
! if (flags & ASS_APPEND)
! rval += lval;
! retval = itos (rval);
}
else if (value)
{
! if (flags & ASS_APPEND)
! {
! oval = value_cell (var);
! if (oval == 0) /* paranoia */
! oval = "";
! olen = STRLEN (oval);
! retval = (char *)xmalloc (olen + (value ? STRLEN (value) : 0) + 1);
! strcpy (retval, oval);
! if (value)
! strcpy (retval+olen, value);
! }
! else if (*value)
retval = savestring (value);
else
***************
*** 1791,1799 ****
temporary environment (but usually is not). */
static SHELL_VAR *
! bind_variable_internal (name, value, table, hflags)
const char *name;
char *value;
HASH_TABLE *table;
! int hflags;
{
char *newval;
--- 1819,1827 ----
temporary environment (but usually is not). */
static SHELL_VAR *
! bind_variable_internal (name, value, table, hflags, aflags)
const char *name;
char *value;
HASH_TABLE *table;
! int hflags, aflags;
{
char *newval;
***************
*** 1805,1809 ****
{
entry = make_new_variable (name, table);
! var_setvalue (entry, make_variable_value (entry, value));
}
else if (entry->assign_func) /* array vars have assign functions now */
--- 1833,1837 ----
{
entry = make_new_variable (name, table);
! var_setvalue (entry, make_variable_value (entry, value, 0)); /* XXX */
}
else if (entry->assign_func) /* array vars have assign functions now */
***************
*** 1824,1828 ****
VUNSETATTR (entry, att_invisible);
! newval = make_variable_value (entry, value);
/* Invalidate any cached export string */
--- 1852,1856 ----
VUNSETATTR (entry, att_invisible);
! newval = make_variable_value (entry, value, aflags); /* XXX */
/* Invalidate any cached export string */
***************
*** 1861,1867 ****
SHELL_VAR *
! bind_variable (name, value)
const char *name;
char *value;
{
SHELL_VAR *v;
--- 1889,1896 ----
SHELL_VAR *
! bind_variable (name, value, flags)
const char *name;
char *value;
+ int flags;
{
SHELL_VAR *v;
***************
*** 1890,1897 ****
v = hash_lookup (name, vc->table);
if (v)
! return (bind_variable_internal (name, value, vc->table, 0));
}
}
! return (bind_variable_internal (name, value, global_variables->table, 0));
}
--- 1919,1926 ----
v = hash_lookup (name, vc->table);
if (v)
! return (bind_variable_internal (name, value, vc->table, 0, flags));
}
}
! return (bind_variable_internal (name, value, global_variables->table, 0, flags));
}
***************
*** 1902,1908 ****
and note that the export environment needs to be recreated. */
SHELL_VAR *
! bind_variable_value (var, value)
SHELL_VAR *var;
char *value;
{
char *t;
--- 1931,1938 ----
and note that the export environment needs to be recreated. */
SHELL_VAR *
! bind_variable_value (var, value, aflags)
SHELL_VAR *var;
char *value;
+ int aflags;
{
char *t;
***************
*** 1910,1914 ****
VUNSETATTR (var, att_invisible);
! t = make_variable_value (var, value);
FREE (value_cell (var));
var_setvalue (var, t);
--- 1940,1944 ----
VUNSETATTR (var, att_invisible);
! t = make_variable_value (var, value, aflags);
FREE (value_cell (var));
var_setvalue (var, t);
***************
*** 1966,1973 ****
#if defined (ARRAY_VARS)
if (isarr)
! v = assign_array_element (lhs, rhs);
else
#endif
! v = bind_variable (lhs, rhs);
if (isint)
--- 1996,2003 ----
#if defined (ARRAY_VARS)
if (isarr)
! v = assign_array_element (lhs, rhs, 0);
else
#endif
! v = bind_variable (lhs, rhs, 0);
if (isint)
***************
*** 2068,2077 ****
temporary environments. The expansion code in subst.c calls this. */
int
! assign_in_env (string)
! const char *string;
{
int offset;
char *name, *temp, *value;
SHELL_VAR *var;
offset = assignment (string, 0);
--- 2098,2110 ----
temporary environments. The expansion code in subst.c calls this. */
int
! assign_in_env (word)
! WORD_DESC *word;
{
int offset;
char *name, *temp, *value;
SHELL_VAR *var;
+ const char *string;
+
+ string = word->word;
offset = assignment (string, 0);
***************
*** 2083,2086 ****
--- 2116,2123 ----
name[offset] = 0;
+ /* ignore the `+' when assigning temporary environment */
+ if (name[offset - 1] == '+')
+ name[offset - 1] = '\0';
+
var = find_variable (name);
if (var && (readonly_p (var) || noassign_p (var)))
***************
*** 2093,2100 ****
temp = name + offset + 1;
temp = (xstrchr (temp, '~') != 0) ? bash_tilde_expand (temp, 1) : savestring (temp);
-
value = expand_string_unsplit_to_string (temp, 0);
free (temp);
}
--- 2130,2140 ----
temp = name + offset + 1;
+ #if 0
temp = (xstrchr (temp, '~') != 0) ? bash_tilde_expand (temp, 1) : savestring (temp);
value = expand_string_unsplit_to_string (temp, 0);
free (temp);
+ #else
+ value = expand_assignment_string_to_string (temp, 0);
+ #endif
}
***************
*** 2306,2309 ****
--- 2346,2355 ----
if (old_var && local_p (old_var) && variable_context == old_var->context)
{
+ #if defined (ARRAY_VARS)
+ if (array_p (old_var))
+ array_dispose (array_cell (old_var));
+ else
+ #endif
+ FREE (value_cell (old_var));
/* Reset the attributes. Preserve the export attribute if the variable
came from a temporary environment. Make sure it stays local, and
***************
*** 2312,2316 ****
VSETATTR (old_var, att_local);
VSETATTR (old_var, att_invisible);
- FREE (value_cell (old_var));
var_setvalue (old_var, (char *)NULL);
INVALIDATE_EXPORTSTR (old_var);
--- 2358,2361 ----
***************
*** 2390,2394 ****
if (!entry) \
{ \
! entry = bind_variable (name, ""); \
if (!no_invisible_vars) entry->attributes |= att_invisible; \
} \
--- 2435,2439 ----
if (!entry) \
{ \
! entry = bind_variable (name, "", 0); \
if (!no_invisible_vars) entry->attributes |= att_invisible; \
} \
***************
*** 2832,2836 ****
}
! v = bind_variable_internal (var->name, value_cell (var), binding_table, 0);
/* XXX - should we set the context here? It shouldn't matter because of how
--- 2877,2881 ----
}
! v = bind_variable_internal (var->name, value_cell (var), binding_table, 0, 0);
/* XXX - should we set the context here? It shouldn't matter because of how
***************
*** 3350,3354 ****
{
/* XXX - should we set v->context here? */
! v = bind_variable_internal (var->name, value_cell (var), shell_variables->table, 0);
if (shell_variables == global_variables)
var->attributes &= ~(att_tempvar|att_propagate);
--- 3395,3399 ----
{
/* XXX - should we set v->context here? */
! v = bind_variable_internal (var->name, value_cell (var), shell_variables->table, 0, 0);
if (shell_variables == global_variables)
var->attributes &= ~(att_tempvar|att_propagate);
***************
*** 3429,3436 ****
/* If a temp var had its export attribute set, or it's marked to be
propagated, bind it in the previous scope before disposing it. */
if (exported_p (var) || (var->attributes & att_propagate))
{
var->attributes &= ~att_tempvar; /* XXX */
! v = bind_variable_internal (var->name, value_cell (var), shell_variables->table, 0);
if (shell_variables == global_variables)
var->attributes &= ~att_propagate;
--- 3474,3487 ----
/* If a temp var had its export attribute set, or it's marked to be
propagated, bind it in the previous scope before disposing it. */
+ /* XXX - This isn't exactly right, because all tempenv variables have the
+ export attribute set. */
+ #if 0
if (exported_p (var) || (var->attributes & att_propagate))
+ #else
+ if (tempvar_p (var) && exported_p (var) && (var->attributes & att_propagate))
+ #endif
{
var->attributes &= ~att_tempvar; /* XXX */
! v = bind_variable_internal (var->name, value_cell (var), shell_variables->table, 0, 0);
if (shell_variables == global_variables)
var->attributes &= ~att_propagate;
***************
*** 3650,3653 ****
--- 3701,3705 ----
{ "LC_MESSAGES", sv_locale },
{ "LC_NUMERIC", sv_locale },
+ { "LC_TIME", sv_locale },
{ "MAIL", sv_mail },
+528 -119
View File
@@ -1,144 +1,553 @@
*** ../bash-2.05b-patched/builtins/cd.def Mon Jul 15 14:51:39 2002
--- builtins/cd.def Sun Nov 7 15:13:42 2004
*** ../bash-3.0-patched/execute_cmd.c Sun Jul 4 14:12:58 2004
--- execute_cmd.c Wed Dec 1 16:50:48 2004
***************
*** 122,126 ****
the_current_working_directory () */
static char *
! resetpwd ()
{
char *tdir;
--- 124,129 ----
the_current_working_directory () */
static char *
! resetpwd (caller)
! char *caller;
{
char *tdir;
*** 1,5 ****
/* execute_command.c -- Execute a COMMAND structure. */
! /* Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
--- 1,5 ----
/* execute_command.c -- Execute a COMMAND structure. */
! /* Copyright (C) 1987-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
***************
*** 128,132 ****
FREE (the_current_working_directory);
the_current_working_directory = (char *)NULL;
! tdir = get_working_directory ("cd");
return (tdir);
}
--- 131,135 ----
FREE (the_current_working_directory);
the_current_working_directory = (char *)NULL;
! tdir = get_working_directory (caller);
return (tdir);
}
*** 161,165 ****
static int execute_while_or_until __P((WHILE_COM *, int));
static int execute_if_command __P((IF_COM *));
! static int execute_null_command __P((REDIRECT *, int, int, int, pid_t));
static void fix_assignment_words __P((WORD_LIST *));
static int execute_simple_command __P((SIMPLE_COM *, int, int, int, struct fd_bitmap *));
--- 161,165 ----
static int execute_while_or_until __P((WHILE_COM *, int));
static int execute_if_command __P((IF_COM *));
! static int execute_null_command __P((REDIRECT *, int, int, int));
static void fix_assignment_words __P((WORD_LIST *));
static int execute_simple_command __P((SIMPLE_COM *, int, int, int, struct fd_bitmap *));
***************
*** 333,336 ****
--- 340,349 ----
directory = tcwd ? (verbatim_pwd ? sh_physpath (tcwd, 0) : tcwd)
: get_working_directory ("pwd");
+
+ /* Try again using getcwd() if canonicalization fails (for instance, if
+ the file system has changed state underneath bash). */
+ if (tcwd && directory == 0)
+ directory = resetpwd ("pwd");
+
#undef tcwd
*** 492,496 ****
int exec_result, invert, ignore_return, was_error_trap;
REDIRECT *my_undo_list, *exec_undo_list;
- volatile pid_t last_pid;
volatile int save_line_number;
--- 492,495 ----
***************
*** 649,653 ****
call to execute_simple_command if a longjmp occurs as the
result of a `return' builtin. This is true for sure with gcc. */
! last_pid = last_made_pid;
was_error_trap = signal_is_trapped (ERROR_TRAP) && signal_is_ignored (ERROR_TRAP) == 0;
--- 648,652 ----
call to execute_simple_command if a longjmp occurs as the
result of a `return' builtin. This is true for sure with gcc. */
! last_made_pid = NO_PID;
was_error_trap = signal_is_trapped (ERROR_TRAP) && signal_is_ignored (ERROR_TRAP) == 0;
***************
*** 364,368 ****
{
char *t, *tdir;
! int err, canon_failed;
tdir = (char *)NULL;
--- 379,383 ----
{
char *t, *tdir;
! int err, canon_failed, r;
tdir = (char *)NULL;
*** 679,683 ****
when the shell is compiled without job control. */
if (already_making_children && pipe_out == NO_PIPE &&
! last_pid != last_made_pid)
{
stop_pipeline (asynchronous, (COMMAND *)NULL);
--- 678,682 ----
when the shell is compiled without job control. */
if (already_making_children && pipe_out == NO_PIPE &&
! last_made_pid != NO_PID)
{
stop_pipeline (asynchronous, (COMMAND *)NULL);
***************
*** 399,403 ****
if (posixly_correct && nolinks == 0 && canon_failed)
{
! errno = ENOENT;
return (0);
}
--- 414,423 ----
if (posixly_correct && nolinks == 0 && canon_failed)
{
! #if defined ENAMETOOLONG
! if (errno != ENOENT && errno != ENAMETOOLONG)
! #else
! if (errno != ENOENT)
! #endif
! errno = ENOTDIR;
return (0);
}
*** 699,710 ****
pipelines) to be waited for twice. */
exec_result = wait_for (last_made_pid);
- #if defined (RECYCLES_PIDS)
- /* LynxOS, for one, recycles pids very quickly -- so quickly
- that a new process may have the same pid as the last one
- created. This has been reported to fix the problem on that
- OS, and a similar problem on Cygwin. */
- if (exec_result == 0)
- last_made_pid = NO_PID;
- #endif
}
}
--- 698,701 ----
***************
*** 409,418 ****
shell's idea of the_current_working_directory. */
if (canon_failed)
- resetpwd ();
- else
*** 1275,1278 ****
--- 1266,1274 ----
tcom = (command->type == cm_subshell) ? command->value.Subshell->command : command;
+ if (command->flags & CMD_TIME_PIPELINE)
+ tcom->flags |= CMD_TIME_PIPELINE;
+ if (command->flags & CMD_TIME_POSIX)
+ tcom->flags |= CMD_TIME_POSIX;
+
/* Make sure the subshell inherits any CMD_IGNORE_RETURN flag. */
if ((command->flags & CMD_IGNORE_RETURN) && tcom != command)
***************
*** 1356,1359 ****
--- 1352,1356 ----
terminate_current_pipeline ();
kill_current_pipeline ();
+ UNBLOCK_CHILD (oset);
#endif /* JOB_CONTROL */
last_command_exit_value = EXECUTION_FAILURE;
***************
*** 1623,1628 ****
xtrace_print_for_command_head (for_command);
! /* Save this command unless it's a trap command. */
! if (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0))
{
! FREE (the_current_working_directory);
! the_current_working_directory = tdir;
FREE (the_printed_command_except_trap);
--- 1620,1626 ----
xtrace_print_for_command_head (for_command);
! /* Save this command unless it's a trap command and we're not running
! a debug trap. */
! if (signal_in_progress (DEBUG_TRAP) == 0 && (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0)))
{
FREE (the_printed_command_except_trap);
***************
*** 1639,1643 ****
this_command_name = (char *)NULL;
! v = bind_variable (identifier, list->word->word);
if (readonly_p (v) || noassign_p (v))
{
--- 1637,1641 ----
this_command_name = (char *)NULL;
! v = bind_variable (identifier, list->word->word, 0);
if (readonly_p (v) || noassign_p (v))
{
***************
*** 1686,1690 ****
SHELL_VAR *new_value;
! new_value = bind_variable (identifier, value_cell(old_value));
new_value->attributes = old_value->attributes;
dispose_variable (old_value);
--- 1684,1688 ----
SHELL_VAR *new_value;
! new_value = bind_variable (identifier, value_cell(old_value), 0);
new_value->attributes = old_value->attributes;
dispose_variable (old_value);
***************
*** 1732,1737 ****
command_string_index = 0;
print_arith_command (new);
! FREE (the_printed_command_except_trap);
! the_printed_command_except_trap = savestring (the_printed_command);
r = run_debug_trap ();
--- 1730,1738 ----
command_string_index = 0;
print_arith_command (new);
! if (signal_in_progress (DEBUG_TRAP) == 0)
! {
! FREE (the_printed_command_except_trap);
! the_printed_command_except_trap = savestring (the_printed_command);
! }
r = run_debug_trap ();
***************
*** 2040,2045 ****
xtrace_print_select_command_head (select_command);
! FREE (the_printed_command_except_trap);
! the_printed_command_except_trap = savestring (the_printed_command);
retval = run_debug_trap ();
--- 2041,2049 ----
xtrace_print_select_command_head (select_command);
! if (signal_in_progress (DEBUG_TRAP) == 0 && (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0)))
! {
! FREE (the_printed_command_except_trap);
! the_printed_command_except_trap = savestring (the_printed_command);
! }
retval = run_debug_trap ();
***************
*** 2093,2097 ****
}
return (1);
--- 429,439 ----
shell's idea of the_current_working_directory. */
if (canon_failed)
! v = bind_variable (identifier, selection);
if (readonly_p (v) || noassign_p (v))
{
! t = resetpwd ("cd");
! if (t == 0)
! set_working_directory (tdir);
--- 2097,2101 ----
}
+ else
+ set_working_directory (tdir);
return (1);
! v = bind_variable (identifier, selection, 0);
if (readonly_p (v) || noassign_p (v))
{
***************
*** 425,429 ****
*** 2169,2173 ****
xtrace_print_case_command_head (case_command);
err = errno;
- free (tdir);
! if (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0))
{
FREE (the_printed_command_except_trap);
--- 2173,2177 ----
xtrace_print_case_command_head (case_command);
/* We're not in physical mode (nolinks == 0), but we failed to change to
--- 446,449 ----
! if (signal_in_progress (DEBUG_TRAP == 0) && (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0)))
{
FREE (the_printed_command_except_trap);
***************
*** 432,445 ****
if (chdir (newdir) == 0)
{
! tdir = resetpwd ();
! FREE (tdir);
*** 2186,2197 ****
#endif
! return (1);
}
else
{
errno = err;
! return (0);
}
- /* Posix.2 specifies that the WORD is tilde expanded. */
- if (member ('~', case_command->word->word))
- {
- word = bash_tilde_expand (case_command->word->word, 0);
- free (case_command->word->word);
- case_command->word->word = word;
- }
-
wlist = expand_word_unsplit (case_command->word, 0);
word = wlist ? string_list (wlist) : savestring ("");
--- 2190,2193 ----
***************
*** 2211,2223 ****
for (list = clauses->patterns; list; list = list->next)
{
- /* Posix.2 specifies to tilde expand each member of the pattern
- list. */
- if (member ('~', list->word->word))
- {
- pattern = bash_tilde_expand (list->word->word, 0);
- free (list->word->word);
- list->word->word = pattern;
- }
-
es = expand_word_leave_quoted (list->word, 0);
--- 2207,2210 ----
***************
*** 2396,2401 ****
command_string_index = 0;
print_arith_command (arith_command->exp);
! FREE (the_printed_command_except_trap);
! the_printed_command_except_trap = savestring (the_printed_command);
/* Run the debug trap before each arithmetic command, but do it after we
--- 2383,2392 ----
command_string_index = 0;
print_arith_command (arith_command->exp);
!
! if (signal_in_progress (DEBUG_TRAP) == 0)
! {
! FREE (the_printed_command_except_trap);
! the_printed_command_except_trap = savestring (the_printed_command);
! }
/* Run the debug trap before each arithmetic command, but do it after we
***************
*** 2509,2515 ****
else
#endif /* COND_REGEXP */
! result = binary_test (cond->op->word, arg1, arg2, TEST_PATMATCH|TEST_ARITHEXP)
! ? EXECUTION_SUCCESS
! : EXECUTION_FAILURE;
if (arg1 != nullstr)
free (arg1);
--- 2500,2512 ----
else
#endif /* COND_REGEXP */
! {
! int oe;
! oe = extended_glob;
! extended_glob = 1;
! result = binary_test (cond->op->word, arg1, arg2, TEST_PATMATCH|TEST_ARITHEXP)
! ? EXECUTION_SUCCESS
! : EXECUTION_FAILURE;
! extended_glob = oe;
! }
if (arg1 != nullstr)
free (arg1);
***************
*** 2547,2552 ****
command_string_index = 0;
print_cond_command (cond_command);
! FREE (the_printed_command_except_trap);
! the_printed_command_except_trap = savestring (the_printed_command);
/* Run the debug trap before each conditional command, but do it after we
--- 2544,2553 ----
command_string_index = 0;
print_cond_command (cond_command);
!
! if (signal_in_progress (DEBUG_TRAP) == 0)
! {
! FREE (the_printed_command_except_trap);
! the_printed_command_except_trap = savestring (the_printed_command);
! }
/* Run the debug trap before each conditional command, but do it after we
***************
*** 2581,2585 ****
if (arg == 0)
arg = "";
! var = bind_variable ("_", arg);
VUNSETATTR (var, att_exported);
}
--- 2582,2586 ----
if (arg == 0)
arg = "";
! var = bind_variable ("_", arg, 0);
VUNSETATTR (var, att_exported);
}
***************
*** 2589,2596 ****
supposed to take place. */
static int
! execute_null_command (redirects, pipe_in, pipe_out, async, old_last_command_subst_pid)
REDIRECT *redirects;
int pipe_in, pipe_out, async;
- pid_t old_last_command_subst_pid;
{
int r;
--- 2590,2596 ----
supposed to take place. */
static int
! execute_null_command (redirects, pipe_in, pipe_out, async)
REDIRECT *redirects;
int pipe_in, pipe_out, async;
{
int r;
***************
*** 2638,2642 ****
if (r != 0)
return (EXECUTION_FAILURE);
! else if (old_last_command_subst_pid != last_command_subst_pid)
return (last_command_exit_value);
else
--- 2638,2642 ----
if (r != 0)
return (EXECUTION_FAILURE);
! else if (last_command_subst_pid != NO_PID)
return (last_command_exit_value);
else
***************
*** 2667,2672 ****
if (b == 0 || (b->flags & ASSIGNMENT_BUILTIN) == 0)
return;
}
! w->word->flags |= (W_NOSPLIT|W_NOGLOB|W_TILDEEXP);
}
}
--- 2667,2674 ----
if (b == 0 || (b->flags & ASSIGNMENT_BUILTIN) == 0)
return;
+ else if (b && (b->flags & ASSIGNMENT_BUILTIN))
+ words->word->flags |= W_ASSNBLTIN;
}
! w->word->flags |= (W_NOSPLIT|W_NOGLOB|W_TILDEEXP|W_ASSIGNARG);
}
}
***************
*** 2684,2688 ****
char *command_line, *lastarg, *temp;
int first_word_quoted, result, builtin_is_special, already_forked, dofork;
! pid_t old_last_command_subst_pid, old_last_async_pid;
sh_builtin_func_t *builtin;
SHELL_VAR *func;
--- 2686,2690 ----
char *command_line, *lastarg, *temp;
int first_word_quoted, result, builtin_is_special, already_forked, dofork;
! pid_t old_last_async_pid;
sh_builtin_func_t *builtin;
SHELL_VAR *func;
***************
*** 2700,2707 ****
print_simple_command (simple_command);
--- 452,471 ----
if (chdir (newdir) == 0)
! if (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0))
{
! t = resetpwd ("cd");
! if (t == 0)
! set_working_directory (tdir);
! else
! free (t);
! r = 1;
FREE (the_printed_command_except_trap);
! the_printed_command_except_trap = savestring (the_printed_command);
}
--- 2702,2709 ----
print_simple_command (simple_command);
! if (signal_in_progress (DEBUG_TRAP) == 0 && (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0)))
{
FREE (the_printed_command_except_trap);
! the_printed_command_except_trap = the_printed_command ? savestring (the_printed_command) : (char *)0;
}
***************
*** 2719,2723 ****
simple_command->words ? (simple_command->words->word->flags & W_QUOTED): 0;
! old_last_command_subst_pid = last_command_subst_pid;
old_last_async_pid = last_asynchronous_pid;
--- 2721,2725 ----
simple_command->words ? (simple_command->words->word->flags & W_QUOTED): 0;
! last_command_subst_pid = NO_PID;
old_last_async_pid = last_asynchronous_pid;
***************
*** 2740,2764 ****
if (dofork)
{
- #if 0
- /* XXX memory leak if expand_words() error causes a jump_to_top_level */
- command_line = savestring (the_printed_command);
- #endif
-
/* Do this now, because execute_disk_command will do it anyway in the
vast majority of cases. */
maybe_make_export_env ();
- #if 0
- if (make_child (command_line, async) == 0)
- #else
if (make_child (savestring (the_printed_command), async) == 0)
- #endif
{
already_forked = 1;
simple_command->flags |= CMD_NO_FORK;
! subshell_environment = (pipe_in != NO_PIPE || pipe_out != NO_PIPE)
! ? (SUBSHELL_PIPE|SUBSHELL_FORK)
! : (SUBSHELL_ASYNC|SUBSHELL_FORK);
/* We need to do this before piping to handle some really
--- 2742,2759 ----
if (dofork)
{
/* Do this now, because execute_disk_command will do it anyway in the
vast majority of cases. */
maybe_make_export_env ();
if (make_child (savestring (the_printed_command), async) == 0)
{
already_forked = 1;
simple_command->flags |= CMD_NO_FORK;
! subshell_environment = SUBSHELL_FORK;
! if (pipe_in != NO_PIPE || pipe_out != NO_PIPE)
! subshell_environment |= SUBSHELL_PIPE;
! if (async)
! subshell_environment |= SUBSHELL_ASYNC;
/* We need to do this before piping to handle some really
***************
*** 2805,2810 ****
result = execute_null_command (simple_command->redirects,
pipe_in, pipe_out,
! already_forked ? 0 : async,
! old_last_command_subst_pid);
if (already_forked)
exit (result);
--- 2800,2804 ----
result = execute_null_command (simple_command->redirects,
pipe_in, pipe_out,
! already_forked ? 0 : async);
if (already_forked)
exit (result);
***************
*** 3060,3064 ****
push_scope (VC_BLTNENV, temporary_env);
if (subshell == 0)
! add_unwind_protect (pop_scope, "1");
temporary_env = (HASH_TABLE *)NULL;
}
--- 3054,3058 ----
push_scope (VC_BLTNENV, temporary_env);
if (subshell == 0)
! add_unwind_protect (pop_scope, (flags & CMD_COMMAND_BUILTIN) ? 0 : "1");
temporary_env = (HASH_TABLE *)NULL;
}
***************
*** 3106,3110 ****
char *debug_trap, *error_trap, *return_trap;
#if defined (ARRAY_VARS)
! SHELL_VAR *funcname_v, *bash_source_v, *bash_lineno_v;
ARRAY *funcname_a, *bash_source_a, *bash_lineno_a;
#endif
--- 3100,3104 ----
char *debug_trap, *error_trap, *return_trap;
#if defined (ARRAY_VARS)
! SHELL_VAR *funcname_v, *nfv, *bash_source_v, *bash_lineno_v;
ARRAY *funcname_a, *bash_source_a, *bash_lineno_a;
#endif
***************
*** 3179,3183 ****
--- 3173,3183 ----
}
+ /* Shell functions inherit the RETURN trap if function tracing is on
+ globally or on individually for this function. */
+ #if 0
if (return_trap && ((trace_p (var) == 0) && function_trace_mode == 0))
+ #else
+ if (return_trap && (signal_in_progress (DEBUG_TRAP) || ((trace_p (var) == 0) && function_trace_mode == 0)))
+ #endif
{
if (subshell == 0)
***************
*** 3232,3236 ****
if (return_val)
! result = return_catch_value;
else
{
errno = err;
! r = 0;
}
--- 3232,3242 ----
if (return_val)
! {
! result = return_catch_value;
! /* Run the RETURN trap in the function's context. */
! save_current = currently_executing_command;
! run_return_trap ();
! currently_executing_command = save_current;
! }
else
{
***************
*** 3256,3259 ****
--- 3262,3269 ----
#else
result = execute_command_internal (fc, 0, NO_PIPE, NO_PIPE, fds_to_close);
+
+ free (tdir);
+ return r;
}
+ save_current = currently_executing_command;
+ run_return_trap ();
+ currently_executing_command = save_current;
#endif
showing_function_line = 0;
***************
*** 3269,3275 ****
funcnest--;
#if defined (ARRAY_VARS)
array_pop (bash_source_a);
- array_pop (funcname_a);
array_pop (bash_lineno_a);
#endif
--- 3279,3292 ----
funcnest--;
#if defined (ARRAY_VARS)
+ /* These two variables cannot be unset, and cannot be affected by the
+ function. */
array_pop (bash_source_a);
array_pop (bash_lineno_a);
+
+ /* FUNCNAME can be unset, and so can potentially be changed by the
+ function. */
+ GET_ARRAY_FROM_VAR ("FUNCNAME", nfv, funcname_a);
+ if (nfv == funcname_v)
+ array_pop (funcname_a);
#endif
+419 -417
View File
File diff suppressed because it is too large Load Diff
+20 -7
View File
@@ -2,7 +2,7 @@
<TITLE>BASH(1) Manual Page</TITLE>
</HEAD>
<BODY><TABLE WIDTH=100%>
<TH ALIGN=LEFT>BASH(1)<TH ALIGN=CENTER>2004 Dec 1<TH ALIGN=RIGHT>BASH(1)
<TH ALIGN=LEFT>BASH(1)<TH ALIGN=CENTER>2004 Dec 22<TH ALIGN=RIGHT>BASH(1)
</TABLE>
<BR><A HREF="#index">Index</A>
<HR>
@@ -1154,7 +1154,12 @@ has special meaning to the shell and must be quoted if it is to
represent itself.
<P>
When the command history expansion facilities are being used, the
When the command history expansion facilities are being used
(see
<FONT SIZE=-1><B>HISTORY EXPANSION</B>
</FONT>
below), the
<I>history expansion</I> character, usually <B>!</B>, must be quoted
to prevent history expansion.
<P>
@@ -1186,8 +1191,10 @@ of all characters within the quotes, with the exception of
<B>`</B>,
and
<B>\</B>.
<B>\</B>,
and, when history expansion is enabled,
<B>!</B>.
The characters
<B>$</B>
@@ -1210,8 +1217,14 @@ or
A double quote may be quoted within double quotes by preceding it with
a backslash.
When command history is being used, the double quote may not be used to
quote the history expansion character.
If enabled, history expansion will be performed unless an
<B>!</B>
appearing in double quotes is escaped using a backslash.
The backslash preceding the
<B>!</B>
is not removed.
<P>
The special parameters
@@ -11415,6 +11428,6 @@ Array variables may not (yet) be exported.
</DL>
<HR>
This document was created by man2html from bash.1.<BR>
Time: 07 December 2004 10:58:07 EST
Time: 30 December 2004 17:01:32 EST
</BODY>
</HTML>
+522 -513
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+36 -17
View File
@@ -1,6 +1,6 @@
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on December, 7 2004 by texi2html 1.64 -->
<!-- Created on December, 30 2004 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
@@ -33,10 +33,10 @@ Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
<H1>Bash Reference Manual</H1></P><P>
This text is a brief description of the features that are present in
the Bash shell (version 3.1-devel, 1 December 2004)..
the Bash shell (version 3.1-devel, 30 December 2004)..
</P><P>
This is Edition 3.1-devel, last updated 1 December 2004,
This is Edition 3.1-devel, last updated 30 December 2004,
of <CITE>The GNU Bash Reference Manual</CITE>,
for <CODE>Bash</CODE>, Version 3.1-devel.
</P><P>
@@ -646,7 +646,8 @@ parameter expansion.
Each of the shell metacharacters (see section <A HREF="bashref.html#SEC4">2. Definitions</A>)
has special meaning to the shell and must be quoted if it is to
represent itself.
When the command history expansion facilities are being used, the
When the command history expansion facilities are being used
(see section <A HREF="bashref.html#SEC118">9.3 History Expansion</A>), the
<VAR>history expansion</VAR> character, usually <SAMP>`!'</SAMP>, must be quoted
to prevent history expansion. See section <A HREF="bashref.html#SEC116">9.1 Bash History Facilities</A>, for
more details concerning history expansion.
@@ -723,7 +724,8 @@ between single quotes, even when preceded by a backslash.
Enclosing characters in double quotes (<SAMP>`"'</SAMP>) preserves the literal value
of all characters within the quotes, with the exception of
<SAMP>`$'</SAMP>, <SAMP>``'</SAMP>, and <SAMP>`\'</SAMP>.
<SAMP>`$'</SAMP>, <SAMP>``'</SAMP>, <SAMP>`\'</SAMP>,
and, when history expansion is enabled, <SAMP>`!'</SAMP>.
The characters <SAMP>`$'</SAMP> and <SAMP>``'</SAMP>
retain their special meaning within double quotes (see section <A HREF="bashref.html#SEC27">3.5 Shell Expansions</A>).
The backslash retains its special meaning only when followed by one of
@@ -734,8 +736,9 @@ characters are removed. Backslashes preceding characters without a
special meaning are left unmodified.
A double quote may be quoted within double quotes by preceding it with
a backslash.
When command history is being used, the double quote may not be used to
quote the history expansion character.
If enabled, history expansion will be performed unless an <SAMP>`!'</SAMP>
appearing in double quotes is escaped using a backslash.
The backslash preceding the <SAMP>`!'</SAMP> is not removed.
</P><P>
The special parameters <SAMP>`*'</SAMP> and <SAMP>`@'</SAMP> have special meaning
@@ -12001,7 +12004,7 @@ database.
<DT><CODE>--with-installed-readline[=<VAR>PREFIX</VAR>]</CODE>
<DD>Define this to make Bash link with a locally-installed version of Readline
rather than the version in <TT>`lib/readline'</TT>. This works only with
Readline 4.3 and later versions. If <VAR>PREFIX</VAR> is <CODE>yes</CODE> or not
Readline 5.0 and later versions. If <VAR>PREFIX</VAR> is <CODE>yes</CODE> or not
supplied, <CODE>configure</CODE> uses the values of the make variables
<CODE>includedir</CODE> and <CODE>libdir</CODE>, which are subdirectories of <CODE>prefix</CODE>
by default, to find the installed version of Readline if it is not in
@@ -12105,6 +12108,10 @@ This allows pipelines as well as shell builtins and functions to be timed.
(see section <A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>).
<P>
<DT><CODE>--enable-debugger</CODE>
<DD>Include support for the bash debugger (distributed separately).
<P>
<DT><CODE>--enable-directory-stack</CODE>
<DD>Include support for a <CODE>csh</CODE>-like directory stack and the
<CODE>pushd</CODE>, <CODE>popd</CODE>, and <CODE>dirs</CODE> builtins
@@ -12160,6 +12167,12 @@ when used in redirections (see section <A HREF="bashref.html#SEC38">3.6 Redirect
the operating system provides the necessary support.
<P>
<DT><CODE>--enable-progcomp</CODE>
<DD>Enable the programmable completion facilities
(see section <A HREF="bashref.html#SEC113">8.6 Programmable Completion</A>).
If Readline is not enabled, this option has no effect.
<P>
<DT><CODE>--enable-prompt-string-decoding</CODE>
<DD>Turn on the interpretation of a number of backslash-escaped characters
in the <CODE>$PS1</CODE>, <CODE>$PS2</CODE>, <CODE>$PS3</CODE>, and <CODE>$PS4</CODE> prompt
@@ -12167,12 +12180,6 @@ strings. See <A HREF="bashref.html#SEC84">6.9 Controlling the Prompt</A>, for a
string escape sequences.
<P>
<DT><CODE>--enable-progcomp</CODE>
<DD>Enable the programmable completion facilities
(see section <A HREF="bashref.html#SEC113">8.6 Programmable Completion</A>).
If Readline is not enabled, this option has no effect.
<P>
<DT><CODE>--enable-readline</CODE>
<DD>Include support for command-line editing and history with the Bash
version of the Readline library (see section <A HREF="bashref.html#SEC91">8. Command Line Editing</A>).
@@ -12189,6 +12196,18 @@ when called as <CODE>rbash</CODE>, enters a restricted mode. See
menus (see section <A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>).
<P>
<DT><CODE>--enable-separate-helpfiles</CODE>
<DD>Use external files for the documentation displayed by the <CODE>help</CODE> builtin
instead of storing the text internally.
<P>
<DT><CODE>--enable-single-help-strings</CODE>
<DD>Store the text displayed by the <CODE>help</CODE> builtin as a single string for
each help topic. This aids in translating the text to different languages.
You may need to disable this if your compiler cannot handle very long string
literals.
<P>
<DT><CODE>--enable-usg-echo-default</CODE>
<DD>A synonym for <CODE>--enable-xpg-echo-default</CODE>.
<P>
@@ -12198,7 +12217,7 @@ menus (see section <A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</
without requiring the <SAMP>`-e'</SAMP> option.
This sets the default value of the <CODE>xpg_echo</CODE> shell option to <CODE>on</CODE>,
which makes the Bash <CODE>echo</CODE> behave more like the version specified in
the Single Unix Specification, version 2.
the Single Unix Specification, version 3.
See section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>, for a description of the escape sequences that
<CODE>echo</CODE> recognizes.
<P>
@@ -15105,7 +15124,7 @@ to permit their use in free software.
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1>About this document</H1>
This document was generated by <I>Chet Ramey</I> on <I>December, 7 2004</I>
This document was generated by <I>Chet Ramey</I> on <I>December, 30 2004</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
<P></P>
@@ -15267,7 +15286,7 @@ the following structure:
<BR>
<FONT SIZE="-1">
This document was generated
by <I>Chet Ramey</I> on <I>December, 7 2004</I>
by <I>Chet Ramey</I> on <I>December, 30 2004</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
+165 -150
View File
@@ -2,10 +2,10 @@ This is bashref.info, produced by makeinfo version 4.7 from
/Users/chet/src/bash/src/doc/bashref.texi.
This text is a brief description of the features that are present in
the Bash shell (version 3.1-devel, 1 December 2004).
the Bash shell (version 3.1-devel, 30 December 2004).
This is Edition 3.1-devel, last updated 1 December 2004, of `The GNU
Bash Reference Manual', for `Bash', Version 3.1-devel.
This is Edition 3.1-devel, last updated 30 December 2004, of `The
GNU Bash Reference Manual', for `Bash', Version 3.1-devel.
Copyright (C) 1988-2004 Free Software Foundation, Inc.
@@ -37,10 +37,10 @@ Bash Features
*************
This text is a brief description of the features that are present in
the Bash shell (version 3.1-devel, 1 December 2004)..
the Bash shell (version 3.1-devel, 30 December 2004)..
This is Edition 3.1-devel, last updated 1 December 2004, of `The GNU
Bash Reference Manual', for `Bash', Version 3.1-devel.
This is Edition 3.1-devel, last updated 30 December 2004, of `The
GNU Bash Reference Manual', for `Bash', Version 3.1-devel.
Bash contains features that appear in other popular shells, and some
features that only appear in Bash. Some of the shells that Bash has
@@ -392,10 +392,10 @@ recognized as such, and to prevent parameter expansion.
Each of the shell metacharacters (*note Definitions::) has special
meaning to the shell and must be quoted if it is to represent itself.
When the command history expansion facilities are being used, the
HISTORY EXPANSION character, usually `!', must be quoted to prevent
history expansion. *Note Bash History Facilities::, for more details
concerning history expansion.
When the command history expansion facilities are being used (*note
History Interaction::), the HISTORY EXPANSION character, usually `!',
must be quoted to prevent history expansion. *Note Bash History
Facilities::, for more details concerning history expansion.
There are three quoting mechanisms: the ESCAPE CHARACTER, single
quotes, and double quotes.
@@ -431,15 +431,17 @@ File: bashref.info, Node: Double Quotes, Next: ANSI-C Quoting, Prev: Single Q
Enclosing characters in double quotes (`"') preserves the literal value
of all characters within the quotes, with the exception of `$', ``',
and `\'. The characters `$' and ``' retain their special meaning
within double quotes (*note Shell Expansions::). The backslash retains
its special meaning only when followed by one of the following
characters: `$', ``', `"', `\', or `newline'. Within double quotes,
backslashes that are followed by one of these characters are removed.
Backslashes preceding characters without a special meaning are left
unmodified. A double quote may be quoted within double quotes by
preceding it with a backslash. When command history is being used, the
double quote may not be used to quote the history expansion character.
`\', and, when history expansion is enabled, `!'. The characters `$'
and ``' retain their special meaning within double quotes (*note Shell
Expansions::). The backslash retains its special meaning only when
followed by one of the following characters: `$', ``', `"', `\', or
`newline'. Within double quotes, backslashes that are followed by one
of these characters are removed. Backslashes preceding characters
without a special meaning are left unmodified. A double quote may be
quoted within double quotes by preceding it with a backslash. If
enabled, history expansion will be performed unless an `!' appearing in
double quotes is escaped using a backslash. The backslash preceding
the `!' is not removed.
The special parameters `*' and `@' have special meaning when in
double quotes (*note Shell Parameter Expansion::).
@@ -7890,7 +7892,7 @@ that the Bash `configure' recognizes.
`--with-installed-readline[=PREFIX]'
Define this to make Bash link with a locally-installed version of
Readline rather than the version in `lib/readline'. This works
only with Readline 4.3 and later versions. If PREFIX is `yes' or
only with Readline 5.0 and later versions. If PREFIX is `yes' or
not supplied, `configure' uses the values of the make variables
`includedir' and `libdir', which are subdirectories of `prefix' by
default, to find the installed version of Readline if it is not in
@@ -7971,6 +7973,9 @@ does not provide the necessary support.
`=~' binary operator in the `[[' conditional command. (*note
Conditional Constructs::).
`--enable-debugger'
Include support for the bash debugger (distributed separately).
`--enable-directory-stack'
Include support for a `csh'-like directory stack and the `pushd',
`popd', and `dirs' builtins (*note The Directory Stack::).
@@ -8014,17 +8019,17 @@ does not provide the necessary support.
This enables process substitution (*note Process Substitution::) if
the operating system provides the necessary support.
`--enable-progcomp'
Enable the programmable completion facilities (*note Programmable
Completion::). If Readline is not enabled, this option has no
effect.
`--enable-prompt-string-decoding'
Turn on the interpretation of a number of backslash-escaped
characters in the `$PS1', `$PS2', `$PS3', and `$PS4' prompt
strings. See *Note Printing a Prompt::, for a complete list of
prompt string escape sequences.
`--enable-progcomp'
Enable the programmable completion facilities (*note Programmable
Completion::). If Readline is not enabled, this option has no
effect.
`--enable-readline'
Include support for command-line editing and history with the Bash
version of the Readline library (*note Command Line Editing::).
@@ -8038,6 +8043,16 @@ does not provide the necessary support.
Include the `select' builtin, which allows the generation of simple
menus (*note Conditional Constructs::).
`--enable-separate-helpfiles'
Use external files for the documentation displayed by the `help'
builtin instead of storing the text internally.
`--enable-single-help-strings'
Store the text displayed by the `help' builtin as a single string
for each help topic. This aids in translating the text to
different languages. You may need to disable this if your
compiler cannot handle very long string literals.
`--enable-usg-echo-default'
A synonym for `--enable-xpg-echo-default'.
@@ -8046,7 +8061,7 @@ does not provide the necessary support.
default, without requiring the `-e' option. This sets the default
value of the `xpg_echo' shell option to `on', which makes the Bash
`echo' behave more like the version specified in the Single Unix
Specification, version 2. *Note Bash Builtins::, for a
Specification, version 3. *Note Bash Builtins::, for a
description of the escape sequences that `echo' recognizes.
@@ -9444,129 +9459,129 @@ Concept Index

Tag Table:
Node: Top1373
Node: Introduction3533
Node: What is Bash?3762
Node: What is a shell?4855
Node: Definitions7396
Node: Basic Shell Features10137
Node: Shell Syntax11356
Node: Shell Operation12388
Node: Quoting13682
Node: Escape Character14956
Node: Single Quotes15441
Node: Double Quotes15789
Node: ANSI-C Quoting16815
Node: Locale Translation17771
Node: Comments18667
Node: Shell Commands19281
Node: Simple Commands20047
Node: Pipelines20678
Node: Lists22553
Node: Compound Commands24184
Node: Looping Constructs24968
Node: Conditional Constructs27415
Node: Command Grouping34482
Node: Shell Functions35931
Node: Shell Parameters40221
Node: Positional Parameters42551
Node: Special Parameters43451
Node: Shell Expansions46376
Node: Brace Expansion48301
Node: Tilde Expansion50626
Node: Shell Parameter Expansion52977
Node: Command Substitution60486
Node: Arithmetic Expansion61819
Node: Process Substitution62669
Node: Word Splitting63719
Node: Filename Expansion65180
Node: Pattern Matching67316
Node: Quote Removal70641
Node: Redirections70936
Node: Executing Commands78666
Node: Simple Command Expansion79341
Node: Command Search and Execution81271
Node: Command Execution Environment83277
Node: Environment86048
Node: Exit Status87708
Node: Signals88912
Node: Shell Scripts90876
Node: Shell Builtin Commands93394
Node: Bourne Shell Builtins94973
Node: Bash Builtins111926
Node: The Set Builtin140066
Node: Special Builtins148473
Node: Shell Variables149450
Node: Bourne Shell Variables149890
Node: Bash Variables151871
Node: Bash Features171578
Node: Invoking Bash172461
Node: Bash Startup Files178282
Node: Interactive Shells183140
Node: What is an Interactive Shell?183550
Node: Is this Shell Interactive?184200
Node: Interactive Shell Behavior185015
Node: Bash Conditional Expressions188291
Node: Shell Arithmetic191870
Node: Aliases194616
Node: Arrays197184
Node: The Directory Stack200451
Node: Directory Stack Builtins201165
Node: Printing a Prompt204056
Node: The Restricted Shell206770
Node: Bash POSIX Mode208602
Node: Job Control215935
Node: Job Control Basics216402
Node: Job Control Builtins220778
Node: Job Control Variables225130
Node: Command Line Editing226288
Node: Introduction and Notation227287
Node: Readline Interaction228909
Node: Readline Bare Essentials230100
Node: Readline Movement Commands231889
Node: Readline Killing Commands232854
Node: Readline Arguments234774
Node: Searching235818
Node: Readline Init File238004
Node: Readline Init File Syntax239063
Node: Conditional Init Constructs250922
Node: Sample Init File253455
Node: Bindable Readline Commands256572
Node: Commands For Moving257779
Node: Commands For History258640
Node: Commands For Text261795
Node: Commands For Killing264468
Node: Numeric Arguments266610
Node: Commands For Completion267749
Node: Keyboard Macros271342
Node: Miscellaneous Commands271913
Node: Readline vi Mode277224
Node: Programmable Completion278138
Node: Programmable Completion Builtins283950
Node: Using History Interactively291546
Node: Bash History Facilities292226
Node: Bash History Builtins294921
Node: History Interaction298778
Node: Event Designators301334
Node: Word Designators302349
Node: Modifiers303988
Node: Installing Bash305394
Node: Basic Installation306531
Node: Compilers and Options309223
Node: Compiling For Multiple Architectures309964
Node: Installation Names311628
Node: Specifying the System Type312446
Node: Sharing Defaults313162
Node: Operation Controls313835
Node: Optional Features314793
Node: Reporting Bugs323072
Node: Major Differences From The Bourne Shell324266
Node: Copying This Manual340174
Node: GNU Free Documentation License340450
Node: Builtin Index362856
Node: Reserved Word Index369405
Node: Variable Index371841
Node: Function Index382701
Node: Concept Index389421
Node: Top1375
Node: Introduction3537
Node: What is Bash?3766
Node: What is a shell?4859
Node: Definitions7400
Node: Basic Shell Features10141
Node: Shell Syntax11360
Node: Shell Operation12392
Node: Quoting13686
Node: Escape Character14990
Node: Single Quotes15475
Node: Double Quotes15823
Node: ANSI-C Quoting16948
Node: Locale Translation17904
Node: Comments18800
Node: Shell Commands19414
Node: Simple Commands20180
Node: Pipelines20811
Node: Lists22686
Node: Compound Commands24317
Node: Looping Constructs25101
Node: Conditional Constructs27548
Node: Command Grouping34615
Node: Shell Functions36064
Node: Shell Parameters40354
Node: Positional Parameters42684
Node: Special Parameters43584
Node: Shell Expansions46509
Node: Brace Expansion48434
Node: Tilde Expansion50759
Node: Shell Parameter Expansion53110
Node: Command Substitution60619
Node: Arithmetic Expansion61952
Node: Process Substitution62802
Node: Word Splitting63852
Node: Filename Expansion65313
Node: Pattern Matching67449
Node: Quote Removal70774
Node: Redirections71069
Node: Executing Commands78799
Node: Simple Command Expansion79474
Node: Command Search and Execution81404
Node: Command Execution Environment83410
Node: Environment86181
Node: Exit Status87841
Node: Signals89045
Node: Shell Scripts91009
Node: Shell Builtin Commands93527
Node: Bourne Shell Builtins95106
Node: Bash Builtins112059
Node: The Set Builtin140199
Node: Special Builtins148606
Node: Shell Variables149583
Node: Bourne Shell Variables150023
Node: Bash Variables152004
Node: Bash Features171711
Node: Invoking Bash172594
Node: Bash Startup Files178415
Node: Interactive Shells183273
Node: What is an Interactive Shell?183683
Node: Is this Shell Interactive?184333
Node: Interactive Shell Behavior185148
Node: Bash Conditional Expressions188424
Node: Shell Arithmetic192003
Node: Aliases194749
Node: Arrays197317
Node: The Directory Stack200584
Node: Directory Stack Builtins201298
Node: Printing a Prompt204189
Node: The Restricted Shell206903
Node: Bash POSIX Mode208735
Node: Job Control216068
Node: Job Control Basics216535
Node: Job Control Builtins220911
Node: Job Control Variables225263
Node: Command Line Editing226421
Node: Introduction and Notation227420
Node: Readline Interaction229042
Node: Readline Bare Essentials230233
Node: Readline Movement Commands232022
Node: Readline Killing Commands232987
Node: Readline Arguments234907
Node: Searching235951
Node: Readline Init File238137
Node: Readline Init File Syntax239196
Node: Conditional Init Constructs251055
Node: Sample Init File253588
Node: Bindable Readline Commands256705
Node: Commands For Moving257912
Node: Commands For History258773
Node: Commands For Text261928
Node: Commands For Killing264601
Node: Numeric Arguments266743
Node: Commands For Completion267882
Node: Keyboard Macros271475
Node: Miscellaneous Commands272046
Node: Readline vi Mode277357
Node: Programmable Completion278271
Node: Programmable Completion Builtins284083
Node: Using History Interactively291679
Node: Bash History Facilities292359
Node: Bash History Builtins295054
Node: History Interaction298911
Node: Event Designators301467
Node: Word Designators302482
Node: Modifiers304121
Node: Installing Bash305527
Node: Basic Installation306664
Node: Compilers and Options309356
Node: Compiling For Multiple Architectures310097
Node: Installation Names311761
Node: Specifying the System Type312579
Node: Sharing Defaults313295
Node: Operation Controls313968
Node: Optional Features314926
Node: Reporting Bugs323735
Node: Major Differences From The Bourne Shell324929
Node: Copying This Manual340837
Node: GNU Free Documentation License341113
Node: Builtin Index363519
Node: Reserved Word Index370068
Node: Variable Index372504
Node: Function Index383364
Node: Concept Index390084

End Tag Table
+12 -12
View File
@@ -1,4 +1,4 @@
This is TeX, Version 3.14159 (Web2C 7.4.5) (format=tex 2003.12.31) 7 DEC 2004 10:57
This is TeX, Version 3.14159 (Web2C 7.4.5) (format=tex 2003.12.31) 30 DEC 2004 17:01
**/Users/chet/src/bash/src/doc/bashref.texi
(/Users/chet/src/bash/src/doc/bashref.texi (./texinfo.tex
Loading texinfo [version 2003-02-03.16]: Basics,
@@ -158,7 +158,7 @@ and turning on texinfo input format.) (./bashref.aux)
[1] Chapter 2 [2] [3]
Chapter 3 [4] [5] [6] [7] [8] [9] [10]
Overfull \hbox (43.33539pt too wide) in paragraph at lines 862--862
Overfull \hbox (43.33539pt too wide) in paragraph at lines 865--865
[]@texttt case @textttsl word @texttt in [ [(] @textttsl pat-tern @texttt [| @
textttsl pat-tern@texttt ][]) @textttsl command-list @texttt ;;][] esac[][]
@@ -172,7 +172,7 @@ textttsl pat-tern@texttt ][]) @textttsl command-list @texttt ;;][] esac[][]
[11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25]
[26] [27] [28] [29] [30] [31] Chapter 4 [32] [33] [34] [35] [36] [37] [38]
Underfull \hbox (badness 5231) in paragraph at lines 3129--3142
Underfull \hbox (badness 5231) in paragraph at lines 3132--3145
@texttt emacs-meta[]@textrm , @texttt emacs-ctlx[]@textrm , @texttt vi[]@textr
m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
@@ -185,7 +185,7 @@ m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
.etc.
[39] [40] [41] [42] [43]
Overfull \hbox (43.33536pt too wide) in paragraph at lines 3467--3467
Overfull \hbox (43.33536pt too wide) in paragraph at lines 3470--3470
[]@texttt read [-ers] [-a @textttsl aname@texttt ] [-d @textttsl de-lim@texttt
] [-n @textttsl nchars@texttt ] [-p @textttsl prompt@texttt ] [-t @textttsl ti
me-
@@ -199,7 +199,7 @@ me-
.etc.
[44] [45] [46] [47] [48] [49] [50] [51]
Underfull \hbox (badness 4036) in paragraph at lines 4079--4086
Underfull \hbox (badness 4036) in paragraph at lines 4082--4089
@texttt -x[]@textrm Print a trace of sim-ple com-mands, @texttt \@textrm fB-fo
r@texttt \@textrm fP com-mands,
@@ -212,7 +212,7 @@ r@texttt \@textrm fP com-mands,
.etc.
[52] [53] Chapter 5 [54] [55] [56] [57] [58] [59] [60] [61] Chapter 6 [62]
Overfull \hbox (51.96864pt too wide) in paragraph at lines 4798--4798
Overfull \hbox (51.96864pt too wide) in paragraph at lines 4801--4801
[]@texttt bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@t
exttt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
@@ -225,7 +225,7 @@ exttt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
.etc.
Overfull \hbox (76.23077pt too wide) in paragraph at lines 4799--4799
Overfull \hbox (76.23077pt too wide) in paragraph at lines 4802--4802
[]@texttt bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@texttt
] [-O @textttsl shopt_option@texttt ] -c @textttsl string @texttt [@textttsl ar
-
@@ -239,7 +239,7 @@ Overfull \hbox (76.23077pt too wide) in paragraph at lines 4799--4799
.etc.
Overfull \hbox (34.72258pt too wide) in paragraph at lines 4800--4800
Overfull \hbox (34.72258pt too wide) in paragraph at lines 4803--4803
[]@texttt bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@text
tt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
@@ -252,7 +252,7 @@ tt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
.etc.
[63] [64]
Underfull \hbox (badness 2245) in paragraph at lines 4974--4976
Underfull \hbox (badness 2245) in paragraph at lines 4977--4979
[]@textrm When a lo-gin shell ex-its, Bash reads and ex-e-cutes com-mands from
the file
@@ -320,7 +320,7 @@ Underfull \hbox (badness 2753) in paragraph at lines 1758--1761
[109]) (/Users/chet/src/bash/src/lib/readline/doc/hsuser.texi Chapter 9
[110] [111] [112] [113] [114]) Chapter 10 [115] [116] [117] [118] [119]
Underfull \hbox (badness 2772) in paragraph at lines 6672--6676
Underfull \hbox (badness 2772) in paragraph at lines 6675--6679
[]@textrm Enable sup-port for large files (@texttt http://www.sas.com/standard
s/large_
@@ -359,10 +359,10 @@ Overfull \vbox (42.26959pt too high) has occurred while \output is active
Here is how much of TeX's memory you used:
1726 strings out of 98002
23501 string characters out of 1221986
52383 words of memory out of 1000001
52385 words of memory out of 1000001
2577 multiletter control sequences out of 10000+50000
31953 words of font info for 111 fonts, out of 500000 for 1000
19 hyphenation exceptions out of 1000
15i,8n,11p,269b,465s stack positions out of 1500i,500n,5000p,200000b,5000s
Output written on bashref.dvi (156 pages, 584768 bytes).
Output written on bashref.dvi (156 pages, 585544 bytes).
+172 -156
View File
@@ -10,7 +10,7 @@
%DVIPSWebPage: (www.radicaleye.com)
%DVIPSCommandLine: dvips -D 600 -t letter -o bashref.ps bashref.dvi
%DVIPSParameters: dpi=600, compressed
%DVIPSSource: TeX output 2004.12.07:1057
%DVIPSSource: TeX output 2004.12.30:1701
%%BeginProcSet: texc.pro
%!
/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
@@ -4234,10 +4234,10 @@ b(,)46 b(Case)g(W)-11 b(estern)46 b(Reserv)l(e)g(Univ)l(ersit)l(y)150
%%Page: 2 2
TeXDict begin 2 1 bop 150 2889 a Ft(This)35 b(text)h(is)g(a)g(brief)f
(description)h(of)f(the)h(features)g(that)g(are)g(presen)m(t)g(in)f
(the)h(Bash)f(shell)h(\(v)m(ersion)150 2999 y(3.1-dev)m(el,)d(1)e
(Decem)m(b)s(er)g(2004\).)150 3133 y(This)42 b(is)h(Edition)g(3.1-dev)m
(el,)49 b(last)44 b(up)s(dated)e(1)h(Decem)m(b)s(er)h(2004,)k(of)43
b Fq(The)f(GNU)i(Bash)f(Reference)150 3243 y(Man)m(ual)p
(the)h(Bash)f(shell)h(\(v)m(ersion)150 2999 y(3.1-dev)m(el,)d(30)e
(Decem)m(b)s(er)g(2004\).)150 3133 y(This)39 b(is)g(Edition)h(3.1-dev)m
(el,)45 b(last)40 b(up)s(dated)f(30)h(Decem)m(b)s(er)g(2004,)k(of)c
Fq(The)f(GNU)h(Bash)g(Reference)150 3243 y(Man)m(ual)p
Ft(,)32 b(for)e Fs(Bash)p Ft(,)f(V)-8 b(ersion)31 b(3.1-dev)m(el.)150
3377 y(Cop)m(yrigh)m(t)602 3374 y(c)577 3377 y Fp(\015)f
Ft(1988-2004)k(F)-8 b(ree)32 b(Soft)m(w)m(are)f(F)-8
@@ -4911,71 +4911,75 @@ eop end
%%Page: 6 12
TeXDict begin 6 11 bop 150 -116 a Ft(6)2617 b(Bash)31
b(Reference)g(Man)m(ual)150 299 y Fk(3.1.2)63 b(Quoting)275
543 y Ft(Quoting)24 b(is)g(used)f(to)h(remo)m(v)m(e)i(the)e(sp)s(ecial)
537 y Ft(Quoting)24 b(is)g(used)f(to)h(remo)m(v)m(e)i(the)e(sp)s(ecial)
g(meaning)g(of)g(certain)h(c)m(haracters)h(or)d(w)m(ords)h(to)g(the)g
(shell.)150 653 y(Quoting)k(can)f(b)s(e)g(used)f(to)j(disable)e(sp)s
(shell.)150 647 y(Quoting)k(can)f(b)s(e)g(used)f(to)j(disable)e(sp)s
(ecial)h(treatmen)m(t)h(for)e(sp)s(ecial)h(c)m(haracters,)i(to)e(prev)m
(en)m(t)g(reserv)m(ed)150 762 y(w)m(ords)i(from)g(b)s(eing)g
(en)m(t)g(reserv)m(ed)150 757 y(w)m(ords)i(from)g(b)s(eing)g
(recognized)h(as)g(suc)m(h,)f(and)g(to)h(prev)m(en)m(t)g(parameter)g
(expansion.)275 897 y(Eac)m(h)22 b(of)g(the)g(shell)g(metac)m
(expansion.)275 886 y(Eac)m(h)22 b(of)g(the)g(shell)g(metac)m
(haracters)i(\(see)f(Chapter)e(2)i([De\014nitions],)h(page)f(3\))g(has)
e(sp)s(ecial)i(meaning)150 1006 y(to)40 b(the)g(shell)f(and)g(m)m(ust)g
e(sp)s(ecial)i(meaning)150 995 y(to)40 b(the)g(shell)f(and)g(m)m(ust)g
(b)s(e)g(quoted)g(if)h(it)g(is)f(to)h(represen)m(t)g(itself.)68
b(When)39 b(the)h(command)f(history)150 1116 y(expansion)f(facilities)j
(are)d(b)s(eing)g(used,)i(the)e Fq(history)h(expansion)f
Ft(c)m(haracter,)k(usually)c(`)p Fs(!)p Ft(',)i(m)m(ust)f(b)s(e)150
1225 y(quoted)27 b(to)g(prev)m(en)m(t)g(history)f(expansion.)39
b(See)27 b(Section)g(9.1)h([Bash)e(History)h(F)-8 b(acilities],)31
b(page)c(111,)i(for)150 1335 y(more)i(details)g(concerning)g(history)f
(expansion.)275 1469 y(There)37 b(are)h(three)f(quoting)h(mec)m
(hanisms:)56 b(the)38 b Fq(escap)s(e)g(c)m(haracter)p
Ft(,)j(single)d(quotes,)i(and)d(double)150 1579 y(quotes.)150
1803 y Fk(3.1.2.1)63 b(Escap)s(e)41 b(Character)275 2047
y Ft(A)27 b(non-quoted)g(bac)m(kslash)h(`)p Fs(\\)p Ft(')f(is)g(the)h
(Bash)f(escap)s(e)g(c)m(haracter.)42 b(It)27 b(preserv)m(es)g(the)g
(literal)i(v)-5 b(alue)28 b(of)150 2157 y(the)f(next)g(c)m(haracter)h
(that)f(follo)m(ws,)i(with)d(the)h(exception)g(of)g Fs(newline)p
Ft(.)38 b(If)26 b(a)h Fs(\\newline)d Ft(pair)i(app)s(ears,)150
2267 y(and)k(the)h(bac)m(kslash)g(itself)g(is)g(not)g(quoted,)g(the)f
Fs(\\newline)f Ft(is)h(treated)i(as)f(a)g(line)g(con)m(tin)m(uation)h
(\(that)150 2376 y(is,)f(it)g(is)f(remo)m(v)m(ed)h(from)f(the)h(input)e
(stream)i(and)f(e\013ectiv)m(ely)j(ignored\).)150 2600
y Fk(3.1.2.2)63 b(Single)42 b(Quotes)275 2844 y Ft(Enclosing)36
b(c)m(haracters)i(in)d(single)i(quotes)g(\(`)p Fs(')p
Ft('\))f(preserv)m(es)h(the)f(literal)h(v)-5 b(alue)37
b(of)f(eac)m(h)h(c)m(haracter)150 2954 y(within)24 b(the)h(quotes.)39
b(A)25 b(single)h(quote)f(ma)m(y)g(not)g(o)s(ccur)g(b)s(et)m(w)m(een)g
(single)h(quotes,)g(ev)m(en)g(when)d(preceded)150 3064
y(b)m(y)30 b(a)h(bac)m(kslash.)150 3288 y Fk(3.1.2.3)63
b(Double)42 b(Quotes)275 3532 y Ft(Enclosing)36 b(c)m(haracters)i(in)e
(double)g(quotes)h(\(`)p Fs(")p Ft('\))g(preserv)m(es)f(the)g(literal)i
(v)-5 b(alue)37 b(of)f(all)h(c)m(haracters)150 3641 y(within)32
b(the)h(quotes,)h(with)e(the)h(exception)h(of)e(`)p Fs($)p
Ft(',)i(`)p Fs(`)p Ft(',)f(and)f(`)p Fs(\\)p Ft('.)48
b(The)32 b(c)m(haracters)i(`)p Fs($)p Ft(')f(and)f(`)p
Fs(`)p Ft(')g(retain)150 3751 y(their)k(sp)s(ecial)h(meaning)g(within)f
(double)g(quotes)h(\(see)g(Section)g(3.5)g([Shell)g(Expansions],)g
(page)g(16\).)150 3861 y(The)30 b(bac)m(kslash)h(retains)f(its)h(sp)s
(ecial)g(meaning)f(only)h(when)e(follo)m(w)m(ed)j(b)m(y)e(one)h(of)f
(the)h(follo)m(wing)g(c)m(har-)150 3970 y(acters:)54
b(`)p Fs($)p Ft(',)39 b(`)p Fs(`)p Ft(',)g(`)p Fs(")p
Ft(',)g(`)p Fs(\\)p Ft(',)f(or)f Fs(newline)p Ft(.)58
b(Within)37 b(double)f(quotes,)j(bac)m(kslashes)f(that)f(are)g(follo)m
(w)m(ed)150 4080 y(b)m(y)28 b(one)g(of)g(these)g(c)m(haracters)i(are)e
(remo)m(v)m(ed.)41 b(Bac)m(kslashes)30 b(preceding)e(c)m(haracters)h
(without)f(a)g(sp)s(ecial)150 4189 y(meaning)j(are)h(left)f(unmo)s
(di\014ed.)41 b(A)31 b(double)g(quote)g(ma)m(y)h(b)s(e)e(quoted)i
(within)e(double)h(quotes)g(b)m(y)g(pre-)150 4299 y(ceding)36
b(it)g(with)f(a)h(bac)m(kslash.)56 b(When)36 b(command)f(history)g(is)h
(b)s(eing)f(used,)h(the)f(double)g(quote)h(ma)m(y)150
4408 y(not)31 b(b)s(e)e(used)h(to)h(quote)g(the)g(history)f(expansion)g
(c)m(haracter.)275 4543 y(The)41 b(sp)s(ecial)h(parameters)f(`)p
Fs(*)p Ft(')h(and)f(`)p Fs(@)p Ft(')h(ha)m(v)m(e)g(sp)s(ecial)g
(meaning)g(when)f(in)g(double)g(quotes)h(\(see)150 4653
y(Section)31 b(3.5.3)h([Shell)f(P)m(arameter)h(Expansion],)e(page)h
(19\).)150 4877 y Fk(3.1.2.4)63 b(ANSI-C)40 b(Quoting)275
5121 y Ft(W)-8 b(ords)33 b(of)h(the)g(form)f Fs($')p
Fj(string)11 b Fs(')31 b Ft(are)j(treated)g(sp)s(ecially)-8
b(When)39 b(the)h(command)f(history)150 1105 y(expansion)i(facilities)j
(are)e(b)s(eing)f(used)g(\(see)h(Section)h(9.3)f([History)h(In)m
(teraction],)j(page)c(113\),)47 b(the)150 1214 y Fq(history)30
b(expansion)h Ft(c)m(haracter,)h(usually)f(`)p Fs(!)p
Ft(',)g(m)m(ust)f(b)s(e)g(quoted)h(to)g(prev)m(en)m(t)g(history)g
(expansion.)41 b(See)150 1324 y(Section)22 b(9.1)g([Bash)f(History)h(F)
-8 b(acilities],)26 b(page)c(111,)j(for)20 b(more)h(details)h
(concerning)g(history)f(expansion.)275 1453 y(There)37
b(are)h(three)f(quoting)h(mec)m(hanisms:)56 b(the)38
b Fq(escap)s(e)g(c)m(haracter)p Ft(,)j(single)d(quotes,)i(and)d(double)
150 1563 y(quotes.)150 1770 y Fk(3.1.2.1)63 b(Escap)s(e)41
b(Character)275 2009 y Ft(A)27 b(non-quoted)g(bac)m(kslash)h(`)p
Fs(\\)p Ft(')f(is)g(the)h(Bash)f(escap)s(e)g(c)m(haracter.)42
b(It)27 b(preserv)m(es)g(the)g(literal)i(v)-5 b(alue)28
b(of)150 2119 y(the)f(next)g(c)m(haracter)h(that)f(follo)m(ws,)i(with)d
(the)h(exception)g(of)g Fs(newline)p Ft(.)38 b(If)26
b(a)h Fs(\\newline)d Ft(pair)i(app)s(ears,)150 2228 y(and)k(the)h(bac)m
(kslash)g(itself)g(is)g(not)g(quoted,)g(the)f Fs(\\newline)f
Ft(is)h(treated)i(as)f(a)g(line)g(con)m(tin)m(uation)h(\(that)150
2338 y(is,)f(it)g(is)f(remo)m(v)m(ed)h(from)f(the)h(input)e(stream)i
(and)f(e\013ectiv)m(ely)j(ignored\).)150 2545 y Fk(3.1.2.2)63
b(Single)42 b(Quotes)275 2784 y Ft(Enclosing)36 b(c)m(haracters)i(in)d
(single)i(quotes)g(\(`)p Fs(')p Ft('\))f(preserv)m(es)h(the)f(literal)h
(v)-5 b(alue)37 b(of)f(eac)m(h)h(c)m(haracter)150 2894
y(within)24 b(the)h(quotes.)39 b(A)25 b(single)h(quote)f(ma)m(y)g(not)g
(o)s(ccur)g(b)s(et)m(w)m(een)g(single)h(quotes,)g(ev)m(en)g(when)d
(preceded)150 3003 y(b)m(y)30 b(a)h(bac)m(kslash.)150
3211 y Fk(3.1.2.3)63 b(Double)42 b(Quotes)275 3450 y
Ft(Enclosing)36 b(c)m(haracters)i(in)e(double)g(quotes)h(\(`)p
Fs(")p Ft('\))g(preserv)m(es)f(the)g(literal)i(v)-5 b(alue)37
b(of)f(all)h(c)m(haracters)150 3559 y(within)25 b(the)g(quotes,)i(with)
e(the)g(exception)h(of)g(`)p Fs($)p Ft(',)g(`)p Fs(`)p
Ft(',)h(`)p Fs(\\)p Ft(',)f(and,)g(when)e(history)i(expansion)f(is)g
(enabled,)150 3669 y(`)p Fs(!)p Ft('.)48 b(The)32 b(c)m(haracters)i(`)p
Fs($)p Ft(')f(and)f(`)p Fs(`)p Ft(')h(retain)g(their)g(sp)s(ecial)g
(meaning)g(within)f(double)h(quotes)g(\(see)g(Sec-)150
3778 y(tion)e(3.5)h([Shell)e(Expansions],)g(page)i(16\).)42
b(The)30 b(bac)m(kslash)h(retains)g(its)g(sp)s(ecial)g(meaning)f(only)h
(when)150 3888 y(follo)m(w)m(ed)40 b(b)m(y)e(one)h(of)g(the)f(follo)m
(wing)i(c)m(haracters:)58 b(`)p Fs($)p Ft(',)41 b(`)p
Fs(`)p Ft(',)g(`)p Fs(")p Ft(',)g(`)p Fs(\\)p Ft(',)g(or)d
Fs(newline)p Ft(.)63 b(Within)38 b(double)150 3998 y(quotes,)c(bac)m
(kslashes)g(that)f(are)g(follo)m(w)m(ed)h(b)m(y)f(one)g(of)f(these)h(c)
m(haracters)i(are)e(remo)m(v)m(ed.)48 b(Bac)m(kslashes)150
4107 y(preceding)25 b(c)m(haracters)h(without)f(a)h(sp)s(ecial)f
(meaning)h(are)f(left)h(unmo)s(di\014ed.)37 b(A)25 b(double)f(quote)i
(ma)m(y)g(b)s(e)150 4217 y(quoted)g(within)f(double)g(quotes)g(b)m(y)h
(preceding)f(it)h(with)f(a)h(bac)m(kslash.)40 b(If)25
b(enabled,)i(history)e(expansion)150 4326 y(will)38 b(b)s(e)e(p)s
(erformed)g(unless)h(an)g(`)p Fs(!)p Ft(')h(app)s(earing)f(in)g(double)
g(quotes)h(is)f(escap)s(ed)g(using)g(a)h(bac)m(kslash.)150
4436 y(The)30 b(bac)m(kslash)h(preceding)f(the)h(`)p
Fs(!)p Ft(')f(is)h(not)f(remo)m(v)m(ed.)275 4565 y(The)41
b(sp)s(ecial)h(parameters)f(`)p Fs(*)p Ft(')h(and)f(`)p
Fs(@)p Ft(')h(ha)m(v)m(e)g(sp)s(ecial)g(meaning)g(when)f(in)g(double)g
(quotes)h(\(see)150 4674 y(Section)31 b(3.5.3)h([Shell)f(P)m(arameter)h
(Expansion],)e(page)h(19\).)150 4882 y Fk(3.1.2.4)63
b(ANSI-C)40 b(Quoting)275 5121 y Ft(W)-8 b(ords)33 b(of)h(the)g(form)f
Fs($')p Fj(string)11 b Fs(')31 b Ft(are)j(treated)g(sp)s(ecially)-8
b(.)52 b(The)33 b(w)m(ord)g(expands)g(to)i Fq(string)p
Ft(,)f(with)150 5230 y(bac)m(kslash-escap)s(ed)44 b(c)m(haracters)h
(replaced)f(as)g(sp)s(eci\014ed)f(b)m(y)g(the)g(ANSI)g(C)g(standard.)79
@@ -12761,7 +12765,7 @@ Fs(--with-bash-malloc)p Ft(.)150 2378 y Fs(--with-installed-readlin)o
b(this)f(to)h(mak)m(e)h(Bash)f(link)f(with)g(a)h(lo)s(cally-installed)i
(v)m(ersion)e(of)g(Readline)g(rather)630 2597 y(than)38
b(the)h(v)m(ersion)g(in)g(`)p Fs(lib/readline)p Ft('.)62
b(This)38 b(w)m(orks)h(only)f(with)h(Readline)g(4.3)h(and)630
b(This)38 b(w)m(orks)h(only)f(with)h(Readline)g(5.0)h(and)630
2706 y(later)29 b(v)m(ersions.)40 b(If)28 b Fq(PREFIX)37
b Ft(is)28 b Fs(yes)f Ft(or)h(not)g(supplied,)f Fs(configure)f
Ft(uses)h(the)h(v)-5 b(alues)29 b(of)630 2816 y(the)c(mak)m(e)g(v)-5
@@ -12806,146 +12810,158 @@ b(Installing)31 b(Bash)2356 b(121)150 299 y Fs(--enable-static-link)630
408 y Ft(This)37 b(causes)h(Bash)f(to)h(b)s(e)f(link)m(ed)h(statically)
-8 b(,)43 b(if)37 b Fs(gcc)g Ft(is)g(b)s(eing)g(used.)61
b(This)37 b(could)h(b)s(e)630 518 y(used)30 b(to)h(build)e(a)i(v)m
(ersion)g(to)g(use)f(as)g(ro)s(ot's)h(shell.)275 663
(ersion)g(to)g(use)f(as)g(ro)s(ot's)h(shell.)275 671
y(The)f(`)p Fs(minimal-config)p Ft(')d(option)k(can)g(b)s(e)f(used)f
(to)j(disable)e(all)i(of)f(the)f(follo)m(wing)i(options,)g(but)d(it)150
772 y(is)h(pro)s(cessed)g(\014rst,)g(so)h(individual)f(options)g(ma)m
781 y(is)h(pro)s(cessed)g(\014rst,)g(so)h(individual)f(options)g(ma)m
(y)h(b)s(e)f(enabled)g(using)g(`)p Fs(enable-)p Fj(feature)11
b Ft('.)275 899 y(All)37 b(of)g(the)f(follo)m(wing)i(options)f(except)h
b Ft('.)275 913 y(All)37 b(of)g(the)f(follo)m(wing)i(options)f(except)h
(for)e(`)p Fs(disabled-builtins)p Ft(')d(and)j(`)p Fs(xpg-echo-default)
p Ft(')150 1009 y(are)26 b(enabled)g(b)m(y)g(default,)h(unless)f(the)g
p Ft(')150 1022 y(are)26 b(enabled)g(b)m(y)g(default,)h(unless)f(the)g
(op)s(erating)g(system)g(do)s(es)g(not)g(pro)m(vide)g(the)g(necessary)g
(supp)s(ort.)150 1154 y Fs(--enable-alias)630 1263 y
(supp)s(ort.)150 1176 y Fs(--enable-alias)630 1285 y
Ft(Allo)m(w)41 b(alias)g(expansion)f(and)f(include)g(the)h
Fs(alias)f Ft(and)g Fs(unalias)e Ft(builtins)j(\(see)g(Sec-)630
1373 y(tion)31 b(6.6)g([Aliases],)i(page)e(71\).)150
1518 y Fs(--enable-arith-for-comma)o(nd)630 1627 y Ft(Include)21
1395 y(tion)31 b(6.6)g([Aliases],)i(page)e(71\).)150
1548 y Fs(--enable-arith-for-comma)o(nd)630 1658 y Ft(Include)21
b(supp)s(ort)g(for)g(the)i(alternate)g(form)f(of)g(the)g
Fs(for)f Ft(command)h(that)h(b)s(eha)m(v)m(es)f(lik)m(e)i(the)630
1737 y(C)30 b(language)i Fs(for)d Ft(statemen)m(t)j(\(see)g(Section)f
1767 y(C)30 b(language)i Fs(for)d Ft(statemen)m(t)j(\(see)g(Section)f
(3.2.4.1)i([Lo)s(oping)d(Constructs],)h(page)g(9\).)150
1881 y Fs(--enable-array-variables)630 1991 y Ft(Include)h(supp)s(ort)g
1921 y Fs(--enable-array-variables)630 2030 y Ft(Include)h(supp)s(ort)g
(for)h(one-dimensional)h(arra)m(y)f(shell)h(v)-5 b(ariables)33
b(\(see)h(Section)g(6.7)h([Ar-)630 2101 y(ra)m(ys],)c(page)g(72\).)150
2245 y Fs(--enable-bang-history)630 2355 y Ft(Include)36
b(\(see)h(Section)g(6.7)h([Ar-)630 2140 y(ra)m(ys],)c(page)g(72\).)150
2293 y Fs(--enable-bang-history)630 2403 y Ft(Include)36
b(supp)s(ort)f(for)h Fs(csh)p Ft(-lik)m(e)h(history)g(substitution)f
(\(see)h(Section)g(9.3)h([History)f(In-)630 2464 y(teraction],)c(page)e
(113\).)150 2609 y Fs(--enable-brace-expansion)630 2719
(\(see)h(Section)g(9.3)h([History)f(In-)630 2513 y(teraction],)c(page)e
(113\).)150 2666 y Fs(--enable-brace-expansion)630 2776
y Ft(Include)40 b Fs(csh)p Ft(-lik)m(e)h(brace)f(expansion)g(\()h
Fs(b{a,b}c)2445 2715 y Fp(7!)2576 2719 y Fs(bac)30 b(bbc)39
b Ft(\).)71 b(See)40 b(Section)h(3.5.1)630 2828 y([Brace)32
Fs(b{a,b}c)2445 2772 y Fp(7!)2576 2776 y Fs(bac)30 b(bbc)39
b Ft(\).)71 b(See)40 b(Section)h(3.5.1)630 2885 y([Brace)32
b(Expansion],)e(page)h(17,)h(for)e(a)g(complete)i(description.)150
2973 y Fs(--enable-command-timing)630 3082 y Ft(Include)43
3039 y Fs(--enable-command-timing)630 3148 y Ft(Include)43
b(supp)s(ort)f(for)h(recognizing)i Fs(time)e Ft(as)g(a)h(reserv)m(ed)g
(w)m(ord)f(and)g(for)h(displa)m(ying)630 3192 y(timing)37
(w)m(ord)f(and)g(for)h(displa)m(ying)630 3258 y(timing)37
b(statistics)h(for)e(the)g(pip)s(eline)g(follo)m(wing)i
Fs(time)d Ft(\(see)i(Section)g(3.2.2)h([Pip)s(elines],)630
3302 y(page)24 b(8\).)39 b(This)23 b(allo)m(ws)h(pip)s(elines)f(as)h(w)
3367 y(page)24 b(8\).)39 b(This)23 b(allo)m(ws)h(pip)s(elines)f(as)h(w)
m(ell)g(as)g(shell)f(builtins)g(and)g(functions)g(to)h(b)s(e)e(timed.)
150 3446 y Fs(--enable-cond-command)630 3556 y Ft(Include)33
150 3521 y Fs(--enable-cond-command)630 3630 y Ft(Include)33
b(supp)s(ort)f(for)i(the)g Fs([[)f Ft(conditional)i(command.)51
b(\(see)34 b(Section)h(3.2.4.2)h([Condi-)630 3665 y(tional)c
(Constructs],)e(page)h(10\).)150 3810 y Fs(--enable-cond-regexp)630
3920 y Ft(Include)f(supp)s(ort)f(for)i(matc)m(hing)h(POSIX)d(regular)i
b(\(see)34 b(Section)h(3.2.4.2)h([Condi-)630 3740 y(tional)c
(Constructs],)e(page)h(10\).)150 3893 y Fs(--enable-cond-regexp)630
4003 y Ft(Include)f(supp)s(ort)f(for)i(matc)m(hing)h(POSIX)d(regular)i
(expressions)g(using)f(the)h(`)p Fs(=~)p Ft(')g(binary)630
4029 y(op)s(erator)25 b(in)f(the)h Fs([[)f Ft(conditional)h(command.)39
4113 y(op)s(erator)25 b(in)f(the)h Fs([[)f Ft(conditional)h(command.)39
b(\(see)25 b(Section)h(3.2.4.2)h([Conditional)e(Con-)630
4139 y(structs],)31 b(page)g(10\).)150 4284 y Fs
(--enable-directory-stack)630 4393 y Ft(Include)i(supp)s(ort)g(for)h(a)
g Fs(csh)p Ft(-lik)m(e)h(directory)f(stac)m(k)i(and)d(the)i
Fs(pushd)p Ft(,)f Fs(popd)p Ft(,)g(and)f Fs(dirs)630
4503 y Ft(builtins)d(\(see)h(Section)g(6.8)h([The)e(Directory)i(Stac)m
(k],)g(page)f(73\).)150 4647 y Fs(--enable-disabled-builti)o(ns)630
4757 y Ft(Allo)m(w)40 b(builtin)e(commands)g(to)h(b)s(e)f(in)m(v)m(ok)m
(ed)i(via)f(`)p Fs(builtin)29 b(xxx)p Ft(')37 b(ev)m(en)j(after)f
Fs(xxx)e Ft(has)630 4867 y(b)s(een)31 b(disabled)g(using)g(`)p
4222 y(structs],)31 b(page)g(10\).)150 4376 y Fs(--enable-debugger)630
4485 y Ft(Include)f(supp)s(ort)e(for)i(the)h(bash)f(debugger)g
(\(distributed)g(separately\).)150 4639 y Fs(--enable-directory-stack)
630 4748 y Ft(Include)j(supp)s(ort)g(for)h(a)g Fs(csh)p
Ft(-lik)m(e)h(directory)f(stac)m(k)i(and)d(the)i Fs(pushd)p
Ft(,)f Fs(popd)p Ft(,)g(and)f Fs(dirs)630 4858 y Ft(builtins)d(\(see)h
(Section)g(6.8)h([The)e(Directory)i(Stac)m(k],)g(page)f(73\).)150
5011 y Fs(--enable-disabled-builti)o(ns)630 5121 y Ft(Allo)m(w)40
b(builtin)e(commands)g(to)h(b)s(e)f(in)m(v)m(ok)m(ed)i(via)f(`)p
Fs(builtin)29 b(xxx)p Ft(')37 b(ev)m(en)j(after)f Fs(xxx)e
Ft(has)630 5230 y(b)s(een)31 b(disabled)g(using)g(`)p
Fs(enable)d(-n)i(xxx)p Ft('.)43 b(See)32 b(Section)g(4.2)h([Bash)e
(Builtins],)i(page)f(39,)630 4976 y(for)e(details)i(of)e(the)h
Fs(builtin)d Ft(and)i Fs(enable)e Ft(builtin)i(commands.)150
5121 y Fs(--enable-dparen-arithmet)o(ic)630 5230 y Ft(Include)42
b(supp)s(ort)f(for)h(the)h Fs(\(\(...)o(\)\))f Ft(command)g(\(see)i
(Section)f(3.2.4.2)i([Conditional)630 5340 y(Constructs],)30
b(page)h(10\).)p eop end
(Builtins],)i(page)f(39,)630 5340 y(for)e(details)i(of)e(the)h
Fs(builtin)d Ft(and)i Fs(enable)e Ft(builtin)i(commands.)p
eop end
%%Page: 122 128
TeXDict begin 122 127 bop 150 -116 a Ft(122)2527 b(Bash)31
b(Reference)g(Man)m(ual)150 299 y Fs(--enable-extended-glob)630
408 y Ft(Include)40 b(supp)s(ort)e(for)i(the)h(extended)f(pattern)h
(matc)m(hing)g(features)g(describ)s(ed)e(ab)s(o)m(v)m(e)630
518 y(under)29 b(Section)i(3.5.8.1)i([P)m(attern)e(Matc)m(hing],)i
(page)e(23.)150 682 y Fs(--enable-help-builtin)630 792
y Ft(Include)24 b(the)h Fs(help)f Ft(builtin,)h(whic)m(h)g(displa)m(ys)
f(help)h(on)f(shell)h(builtins)f(and)h(v)-5 b(ariables)25
b(\(see)630 902 y(Section)31 b(4.2)h([Bash)e(Builtins],)i(page)f(39\).)
150 1066 y Fs(--enable-history)630 1176 y Ft(Include)e(command)g
b(Reference)g(Man)m(ual)150 299 y Fs(--enable-dparen-arithmet)o(ic)630
408 y Ft(Include)42 b(supp)s(ort)f(for)h(the)h Fs(\(\(...)o(\)\))f
Ft(command)g(\(see)i(Section)f(3.2.4.2)i([Conditional)630
518 y(Constructs],)30 b(page)h(10\).)150 673 y Fs
(--enable-extended-glob)630 783 y Ft(Include)40 b(supp)s(ort)e(for)i
(the)h(extended)f(pattern)h(matc)m(hing)g(features)g(describ)s(ed)e(ab)
s(o)m(v)m(e)630 892 y(under)29 b(Section)i(3.5.8.1)i([P)m(attern)e
(Matc)m(hing],)i(page)e(23.)150 1048 y Fs(--enable-help-builtin)630
1157 y Ft(Include)24 b(the)h Fs(help)f Ft(builtin,)h(whic)m(h)g(displa)
m(ys)f(help)h(on)f(shell)h(builtins)f(and)h(v)-5 b(ariables)25
b(\(see)630 1267 y(Section)31 b(4.2)h([Bash)e(Builtins],)i(page)f
(39\).)150 1422 y Fs(--enable-history)630 1532 y Ft(Include)e(command)g
(history)h(and)f(the)h Fs(fc)f Ft(and)g Fs(history)e
Ft(builtin)j(commands)f(\(see)h(Sec-)630 1285 y(tion)h(9.1)g([Bash)g
Ft(builtin)j(commands)f(\(see)h(Sec-)630 1641 y(tion)h(9.1)g([Bash)g
(History)g(F)-8 b(acilities],)34 b(page)d(111\).)150
1450 y Fs(--enable-job-control)630 1559 y Ft(This)e(enables)i(the)f
1797 y Fs(--enable-job-control)630 1906 y Ft(This)e(enables)i(the)f
(job)g(con)m(trol)h(features)g(\(see)g(Chapter)f(7)g([Job)g(Con)m
(trol],)h(page)g(81\),)h(if)630 1669 y(the)f(op)s(erating)f(system)h
(supp)s(orts)d(them.)150 1833 y Fs(--enable-multibyte)630
1943 y Ft(This)h(enables)i(supp)s(ort)d(for)i(m)m(ultib)m(yte)h(c)m
(trol],)h(page)g(81\),)h(if)630 2016 y(the)f(op)s(erating)f(system)h
(supp)s(orts)d(them.)150 2171 y Fs(--enable-multibyte)630
2281 y Ft(This)h(enables)i(supp)s(ort)d(for)i(m)m(ultib)m(yte)h(c)m
(haracters)g(if)f(the)g(op)s(erating)h(system)f(pro)m(vides)630
2052 y(the)h(necessary)f(supp)s(ort.)150 2217 y Fs
(--enable-net-redirection)o(s)630 2326 y Ft(This)21 b(enables)h(the)g
2390 y(the)h(necessary)f(supp)s(ort.)150 2545 y Fs
(--enable-net-redirection)o(s)630 2655 y Ft(This)21 b(enables)h(the)g
(sp)s(ecial)h(handling)e(of)h(\014lenames)g(of)g(the)g(form)f
Fs(/dev/tcp/)p Fj(host)11 b Fs(/)p Fj(port)630 2436 y
Fs(/dev/tcp/)p Fj(host)11 b Fs(/)p Fj(port)630 2765 y
Ft(and)29 b Fs(/dev/udp/)p Fj(host)11 b Fs(/)p Fj(port)34
b Ft(when)28 b(used)g(in)h(redirections)h(\(see)g(Section)g(3.6)g
([Redirec-)630 2545 y(tions],)h(page)g(24\).)150 2710
y Fs(--enable-process-substit)o(utio)o(n)630 2819 y Ft(This)49
([Redirec-)630 2874 y(tions],)h(page)g(24\).)150 3029
y Fs(--enable-process-substit)o(utio)o(n)630 3139 y Ft(This)49
b(enables)i(pro)s(cess)f(substitution)g(\(see)h(Section)g(3.5.6)h([Pro)
s(cess)e(Substitution],)630 2929 y(page)31 b(22\))h(if)e(the)h(op)s
s(cess)e(Substitution],)630 3249 y(page)31 b(22\))h(if)e(the)h(op)s
(erating)f(system)h(pro)m(vides)f(the)h(necessary)g(supp)s(ort.)150
3093 y Fs(--enable-prompt-string-d)o(ecod)o(ing)630 3203
3404 y Fs(--enable-progcomp)630 3513 y Ft(Enable)d(the)g(programmable)g
(completion)i(facilities)g(\(see)f(Section)g(8.6)g([Programmable)630
3623 y(Completion],)i(page)h(105\).)42 b(If)30 b(Readline)h(is)f(not)h
(enabled,)f(this)h(option)g(has)f(no)g(e\013ect.)150
3778 y Fs(--enable-prompt-string-d)o(ecod)o(ing)630 3888
y Ft(T)-8 b(urn)46 b(on)h(the)h(in)m(terpretation)g(of)g(a)g(n)m(um)m
(b)s(er)e(of)h(bac)m(kslash-escap)s(ed)h(c)m(haracters)h(in)630
3313 y(the)39 b Fs($PS1)p Ft(,)g Fs($PS2)p Ft(,)h Fs($PS3)p
3998 y(the)39 b Fs($PS1)p Ft(,)g Fs($PS2)p Ft(,)h Fs($PS3)p
Ft(,)f(and)f Fs($PS4)f Ft(prompt)h(strings.)64 b(See)39
b(Section)g(6.9)h([Prin)m(ting)f(a)630 3422 y(Prompt],)30
b(Section)g(6.9)h([Prin)m(ting)f(a)630 4107 y(Prompt],)30
b(page)h(75,)h(for)e(a)h(complete)h(list)f(of)f(prompt)g(string)g
(escap)s(e)h(sequences.)150 3587 y Fs(--enable-progcomp)630
3696 y Ft(Enable)d(the)g(programmable)g(completion)i(facilities)g
(\(see)f(Section)g(8.6)g([Programmable)630 3806 y(Completion],)i(page)h
(105\).)42 b(If)30 b(Readline)h(is)f(not)h(enabled,)f(this)h(option)g
(has)f(no)g(e\013ect.)150 3970 y Fs(--enable-readline)630
4080 y Ft(Include)e(supp)s(ort)f(for)h(command-line)h(editing)g(and)f
(history)g(with)g(the)h(Bash)g(v)m(ersion)g(of)630 4189
(escap)s(e)h(sequences.)150 4262 y Fs(--enable-readline)630
4372 y Ft(Include)d(supp)s(ort)f(for)h(command-line)h(editing)g(and)f
(history)g(with)g(the)h(Bash)g(v)m(ersion)g(of)630 4482
y(the)i(Readline)g(library)f(\(see)h(Chapter)f(8)g([Command)g(Line)g
(Editing],)h(page)g(85\).)150 4354 y Fs(--enable-restricted)630
4463 y Ft(Include)41 b(supp)s(ort)f(for)i(a)g Fq(restricted)g(shell)p
(Editing],)h(page)g(85\).)150 4637 y Fs(--enable-restricted)630
4746 y Ft(Include)41 b(supp)s(ort)f(for)i(a)g Fq(restricted)g(shell)p
Ft(.)75 b(If)42 b(this)f(is)h(enabled,)j(Bash,)g(when)c(called)630
4573 y(as)f Fs(rbash)p Ft(,)h(en)m(ters)f(a)g(restricted)h(mo)s(de.)68
4856 y(as)f Fs(rbash)p Ft(,)h(en)m(ters)f(a)g(restricted)h(mo)s(de.)68
b(See)40 b(Section)h(6.10)g([The)f(Restricted)h(Shell],)630
4682 y(page)31 b(76,)h(for)e(a)g(description)h(of)f(restricted)h(mo)s
(de.)150 4847 y Fs(--enable-select)630 4956 y Ft(Include)k(the)g
4966 y(page)31 b(76,)h(for)e(a)g(description)h(of)f(restricted)h(mo)s
(de.)150 5121 y Fs(--enable-select)630 5230 y Ft(Include)k(the)g
Fs(select)f Ft(builtin,)i(whic)m(h)f(allo)m(ws)i(the)f(generation)g(of)
g(simple)f(men)m(us)g(\(see)630 5066 y(Section)c(3.2.4.2)i
([Conditional)e(Constructs],)g(page)g(10\).)150 5230
y Fs(--enable-usg-echo-defaul)o(t)630 5340 y Ft(A)f(synon)m(ym)g(for)g
Fs(--enable-xpg-echo-default)p Ft(.)p eop end
g(simple)f(men)m(us)g(\(see)630 5340 y(Section)c(3.2.4.2)i
([Conditional)e(Constructs],)g(page)g(10\).)p eop end
%%Page: 123 129
TeXDict begin 123 128 bop 150 -116 a Ft(Chapter)30 b(10:)41
b(Installing)31 b(Bash)2356 b(123)150 299 y Fs
(--enable-xpg-echo-defaul)o(t)630 408 y Ft(Mak)m(e)26
b(the)f Fs(echo)e Ft(builtin)i(expand)f(bac)m(kslash-escap)s(ed)h(c)m
(haracters)h(b)m(y)f(default,)h(without)630 518 y(requiring)41
(--enable-separate-helpfi)o(les)630 408 y Ft(Use)32 b(external)h
(\014les)f(for)g(the)g(do)s(cumen)m(tation)h(displa)m(y)m(ed)f(b)m(y)g
(the)g Fs(help)f Ft(builtin)h(instead)630 518 y(of)f(storing)f(the)h
(text)g(in)m(ternally)-8 b(.)150 677 y Fs(--enable-single-help-str)o
(ings)630 787 y Ft(Store)40 b(the)g(text)h(displa)m(y)m(ed)g(b)m(y)e
(the)i Fs(help)d Ft(builtin)i(as)g(a)g(single)h(string)f(for)f(eac)m(h)
i(help)630 897 y(topic.)54 b(This)33 b(aids)i(in)f(translating)h(the)g
(text)g(to)g(di\013eren)m(t)g(languages.)54 b(Y)-8 b(ou)35
b(ma)m(y)g(need)630 1006 y(to)c(disable)g(this)f(if)g(y)m(our)h
(compiler)g(cannot)f(handle)g(v)m(ery)h(long)g(string)f(literals.)150
1166 y Fs(--enable-usg-echo-defaul)o(t)630 1275 y Ft(A)g(synon)m(ym)g
(for)g Fs(--enable-xpg-echo-default)p Ft(.)150 1435 y
Fs(--enable-xpg-echo-defaul)o(t)630 1544 y Ft(Mak)m(e)c(the)f
Fs(echo)e Ft(builtin)i(expand)f(bac)m(kslash-escap)s(ed)h(c)m
(haracters)h(b)m(y)f(default,)h(without)630 1654 y(requiring)41
b(the)g(`)p Fs(-e)p Ft(')g(option.)73 b(This)41 b(sets)g(the)g(default)
h(v)-5 b(alue)41 b(of)h(the)f Fs(xpg_echo)e Ft(shell)630
628 y(option)26 b(to)g Fs(on)p Ft(,)g(whic)m(h)g(mak)m(es)g(the)g(Bash)
g Fs(echo)e Ft(b)s(eha)m(v)m(e)i(more)g(lik)m(e)h(the)f(v)m(ersion)g
(sp)s(eci\014ed)630 737 y(in)41 b(the)h(Single)g(Unix)f(Sp)s
(eci\014cation,)k(v)m(ersion)e(2.)74 b(See)42 b(Section)g(4.2)h([Bash)f
(Builtins],)630 847 y(page)31 b(39,)h(for)e(a)g(description)h(of)f(the)
h(escap)s(e)g(sequences)f(that)h Fs(echo)f Ft(recognizes.)275
1006 y(The)23 b(\014le)i(`)p Fs(config-top.h)p Ft(')c(con)m(tains)26
1763 y(option)26 b(to)g Fs(on)p Ft(,)g(whic)m(h)g(mak)m(es)g(the)g
(Bash)g Fs(echo)e Ft(b)s(eha)m(v)m(e)i(more)g(lik)m(e)h(the)f(v)m
(ersion)g(sp)s(eci\014ed)630 1873 y(in)41 b(the)h(Single)g(Unix)f(Sp)s
(eci\014cation,)k(v)m(ersion)e(3.)74 b(See)42 b(Section)g(4.2)h([Bash)f
(Builtins],)630 1983 y(page)31 b(39,)h(for)e(a)g(description)h(of)f
(the)h(escap)s(e)g(sequences)f(that)h Fs(echo)f Ft(recognizes.)275
2142 y(The)23 b(\014le)i(`)p Fs(config-top.h)p Ft(')c(con)m(tains)26
b(C)e(Prepro)s(cessor)g(`)p Fs(#define)p Ft(')e(statemen)m(ts)k(for)f
(options)f(whic)m(h)150 1116 y(are)35 b(not)g(settable)i(from)d
(options)f(whic)m(h)150 2252 y(are)35 b(not)g(settable)i(from)d
Fs(configure)p Ft(.)51 b(Some)35 b(of)g(these)g(are)h(not)f(mean)m(t)g
(to)h(b)s(e)e(c)m(hanged;)k(b)s(ew)m(are)d(of)150 1225
(to)h(b)s(e)e(c)m(hanged;)k(b)s(ew)m(are)d(of)150 2361
y(the)h(consequences)g(if)f(y)m(ou)h(do.)55 b(Read)36
b(the)g(commen)m(ts)g(asso)s(ciated)h(with)e(eac)m(h)i(de\014nition)e
(for)g(more)150 1335 y(information)c(ab)s(out)f(its)h(e\013ect.)p
(for)g(more)150 2471 y(information)c(ab)s(out)f(its)h(e\013ect.)p
eop end
%%Page: 124 130
TeXDict begin 124 129 bop 150 -116 a Ft(124)2527 b(Bash)31
+20 -7
View File
@@ -6645,7 +6645,7 @@ A synonym for @code{--with-bash-malloc}.
@item --with-installed-readline[=@var{PREFIX}]
Define this to make Bash link with a locally-installed version of Readline
rather than the version in @file{lib/readline}. This works only with
Readline 4.3 and later versions. If @var{PREFIX} is @code{yes} or not
Readline 5.0 and later versions. If @var{PREFIX} is @code{yes} or not
supplied, @code{configure} uses the values of the make variables
@code{includedir} and @code{libdir}, which are subdirectories of @code{prefix}
by default, to find the installed version of Readline if it is not in
@@ -6733,6 +6733,9 @@ Include support for matching POSIX regular expressions using the
@samp{=~} binary operator in the @code{[[} conditional command.
(@pxref{Conditional Constructs}).
@item --enable-debugger
Include support for the bash debugger (distributed separately).
@item --enable-directory-stack
Include support for a @code{csh}-like directory stack and the
@code{pushd}, @code{popd}, and @code{dirs} builtins
@@ -6778,17 +6781,17 @@ when used in redirections (@pxref{Redirections}).
This enables process substitution (@pxref{Process Substitution}) if
the operating system provides the necessary support.
@item --enable-progcomp
Enable the programmable completion facilities
(@pxref{Programmable Completion}).
If Readline is not enabled, this option has no effect.
@item --enable-prompt-string-decoding
Turn on the interpretation of a number of backslash-escaped characters
in the @env{$PS1}, @env{$PS2}, @env{$PS3}, and @env{$PS4} prompt
strings. See @ref{Printing a Prompt}, for a complete list of prompt
string escape sequences.
@item --enable-progcomp
Enable the programmable completion facilities
(@pxref{Programmable Completion}).
If Readline is not enabled, this option has no effect.
@item --enable-readline
Include support for command-line editing and history with the Bash
version of the Readline library (@pxref{Command Line Editing}).
@@ -6802,6 +6805,16 @@ when called as @code{rbash}, enters a restricted mode. See
Include the @code{select} builtin, which allows the generation of simple
menus (@pxref{Conditional Constructs}).
@item --enable-separate-helpfiles
Use external files for the documentation displayed by the @code{help} builtin
instead of storing the text internally.
@item --enable-single-help-strings
Store the text displayed by the @code{help} builtin as a single string for
each help topic. This aids in translating the text to different languages.
You may need to disable this if your compiler cannot handle very long string
literals.
@item --enable-usg-echo-default
A synonym for @code{--enable-xpg-echo-default}.
@@ -6810,7 +6823,7 @@ Make the @code{echo} builtin expand backslash-escaped characters by default,
without requiring the @option{-e} option.
This sets the default value of the @code{xpg_echo} shell option to @code{on},
which makes the Bash @code{echo} behave more like the version specified in
the Single Unix Specification, version 2.
the Single Unix Specification, version 3.
@xref{Bash Builtins}, for a description of the escape sequences that
@code{echo} recognizes.
+1 -1
View File
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.18.1
%%CreationDate: Tue Dec 7 10:57:57 2004
%%CreationDate: Thu Dec 30 17:01:22 2004
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
+1 -1
View File
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.18.1
%%CreationDate: Tue Dec 7 10:57:57 2004
%%CreationDate: Thu Dec 30 17:01:22 2004
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%DocumentSuppliedResources: procset grops 1.18 1
+2 -2
View File
@@ -2,9 +2,9 @@
Copyright (C) 1988-2004 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Wed Dec 22 15:49:31 EST 2004
@set LASTCHANGE Thu Dec 30 17:00:22 EST 2004
@set EDITION 3.1-devel
@set VERSION 3.1-devel
@set UPDATED 22 December 2004
@set UPDATED 30 December 2004
@set UPDATED-MONTH December 2004
+1 -1
View File
@@ -50,7 +50,7 @@ extern int errno;
if a signal is received. */
static char localbuf[128];
static int local_index, local_bufused;
static int local_index = 0, local_bufused = 0;
/* Posix and USG systems do not guarantee to restart read () if it is
interrupted by a signal. We do the read ourselves, and restart it
+5 -1
View File
@@ -1947,6 +1947,10 @@ wait_for (pid)
last_command_exit_signal = (job != NO_JOB) ? job_exit_signal (job)
: process_exit_signal (child->status);
/* XXX */
if ((job != NO_JOB && JOBSTATE (job) == JSTOPPED) || WIFSTOPPED (child->status))
termination_state = 128 + WSTOPSIG (child->status);
if (job == NO_JOB || IS_JOBCONTROL (job))
{
/* XXX - under what circumstances is a job not present in the jobs
@@ -2663,7 +2667,7 @@ set_job_status_and_cleanup (job)
* for a foreground job to complete
*/
if (jobs[job]->state == JDEAD)
if (JOBSTATE (job) == JDEAD)
{
/* If we're running a shell script and we get a SIGINT with a
SIGINT trap handler, but the foreground job handles it and
+7 -2
View File
@@ -129,7 +129,8 @@ extern int errno;
#endif /* !MUST_REINSTALL_SIGHANDLERS */
/* Some systems let waitpid(2) tell callers about stopped children. */
#if !defined (WCONTINUED)
#if !defined (WCONTINUED) || defined (WCONTINUED_BROKEN)
# undef WCONTINUED
# define WCONTINUED 0
#endif
#if !defined (WIFCONTINUED)
@@ -1946,6 +1947,10 @@ wait_for (pid)
last_command_exit_signal = (job != NO_JOB) ? job_exit_signal (job)
: process_exit_signal (child->status);
/* XXX */
if ((job != NO_JOB && JOBSTATE (job) == JSTOPPED) || WIFSTOPPED (child->status))
termination_state = 128 + WSTOPSIG (child->status);
if (job == NO_JOB || IS_JOBCONTROL (job))
{
/* XXX - under what circumstances is a job not present in the jobs
@@ -2662,7 +2667,7 @@ set_job_status_and_cleanup (job)
* for a foreground job to complete
*/
if (jobs[job]->state == JDEAD)
if (JOBSTATE (job) == JDEAD)
{
/* If we're running a shell script and we get a SIGINT with a
SIGINT trap handler, but the foreground job handles it and
+9 -4
View File
@@ -1345,8 +1345,13 @@ yy_stream_get ()
result = EOF;
if (bash_input.location.file)
result = getc_with_restart (bash_input.location.file);
{
if (interactive)
interrupt_immediately++;
result = getc_with_restart (bash_input.location.file);
if (interactive)
interrupt_immediately--;
}
return (result);
}
@@ -1659,11 +1664,11 @@ read_a_line (remove_quoted_newline)
pass_next = 0;
while (1)
{
c = yy_getc ();
/* Allow immediate exit if interrupted during input. */
QUIT;
c = yy_getc ();
/* Ignore null bytes in input. */
if (c == 0)
{
Binary file not shown.
+334 -293
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+334 -293
View File
File diff suppressed because it is too large Load Diff
+9 -11
View File
@@ -96,10 +96,11 @@ extern int shell_level;
extern int subshell_environment;
extern int last_command_exit_value;
extern int line_number;
extern char *primary_prompt, *secondary_prompt;
extern int expand_aliases;
extern char *this_command_name;
extern int array_needs_making;
extern int gnu_error_format;
extern char *primary_prompt, *secondary_prompt;
extern char *this_command_name;
/* Non-zero means that this shell has already been run; i.e. you should
call shell_reinitialize () if you need to start afresh. */
@@ -539,6 +540,8 @@ main (argc, argv, env)
#else
no_line_editing |= emacs && emacs[0] == 't' && emacs[1] == '\0' && STREQ (term, "dumb");
#endif
if (running_under_emacs)
gnu_error_format = 1;
}
top_level_arg_index = arg_index;
@@ -1478,17 +1481,12 @@ set_bash_input ()
/* with_input_from_stdin really means `with_input_from_readline' */
if (interactive && no_line_editing == 0)
with_input_from_stdin ();
else
#if defined (BUFFERED_INPUT)
{
if (interactive == 0)
with_input_from_buffered_stream (default_buffered_input, dollar_vars[0]);
else
with_input_from_stream (default_input, dollar_vars[0]);
}
#else /* !BUFFERED_INPUT */
else if (interactive == 0)
with_input_from_buffered_stream (default_buffered_input, dollar_vars[0]);
#endif /* BUFFERED_INPUT */
else
with_input_from_stream (default_input, dollar_vars[0]);
#endif /* !BUFFERED_INPUT */
}
/* Close the current shell script input source and forget about it. This is
+1 -1
View File
@@ -1,4 +1,4 @@
BUILD_DIR=/usr/local/build/chet/bash/bash-current
BUILD_DIR=/usr/local/build/bash/bash-current
THIS_SH=$BUILD_DIR/bash
PATH=$PATH:$BUILD_DIR