mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-06 18:22:25 +02:00
commit bash-20150813 snapshot
This commit is contained in:
@@ -9315,3 +9315,73 @@ execute_cmd.c
|
|||||||
- time_command: catch longjmps to top_level and print command timing
|
- time_command: catch longjmps to top_level and print command timing
|
||||||
statistics even after a jump to top_level. Fixes issue reported by
|
statistics even after a jump to top_level. Fixes issue reported by
|
||||||
Sam Watkins <sam@nipl.net>
|
Sam Watkins <sam@nipl.net>
|
||||||
|
|
||||||
|
8/10
|
||||||
|
----
|
||||||
|
config-top.h
|
||||||
|
- OPENLOG_OPTS: if SYSLOG_HISTORY is defined, define to LOG_PID, so each
|
||||||
|
message is tagged with the pid
|
||||||
|
|
||||||
|
bashhist.h
|
||||||
|
- bash_syslog_history: the first time it's called, call openlog with
|
||||||
|
OPENLOG_OPTS and SYSLOG_FACILITY
|
||||||
|
|
||||||
|
8/11
|
||||||
|
----
|
||||||
|
doc/{bash.1,bashref.texi}
|
||||||
|
- GROUPS,FUNCNAME: change description to note that assignments are silently
|
||||||
|
ignored, but do not return an error (which would constitute an assignment
|
||||||
|
error and cause posix mode shells to abort). Problem pointed out by
|
||||||
|
Grzegorz Bajson <gbajson@gmail.com>
|
||||||
|
|
||||||
|
8/12
|
||||||
|
----
|
||||||
|
subst.c
|
||||||
|
- parameter_brace_expand_indir: if the value of the indirectly expanded
|
||||||
|
variable isn't something that the shell would expand if it were inside
|
||||||
|
${}, error out right away before calling parameter_brace_expand_word.
|
||||||
|
Fixes problem reported by isabella parakiss <izaberina@gmail.com>
|
||||||
|
- parameter_brace_expand: handle returning &expand_wdesc_error or
|
||||||
|
&expand_wdesc_fatal from parameter_brace_expand_indir in case it does
|
||||||
|
that someday
|
||||||
|
|
||||||
|
8/13
|
||||||
|
----
|
||||||
|
jobs.c
|
||||||
|
- {save,restore}_pipeline: saved_pipeline now a linked list of pipelines,
|
||||||
|
new ones allocated in save_pipeline and freed in restore_pipeline. This
|
||||||
|
allow multiple nested calls to save_pipeline (e.g., in traps and then in
|
||||||
|
process substitution). Fix for bug reported by isabella parakiss
|
||||||
|
<izaberina@gmail.com>
|
||||||
|
|
||||||
|
print_cmd.c
|
||||||
|
- named_function_string: if printing a function with the same name as a
|
||||||
|
reserved word, add the `function ' keyword before the name to avoid
|
||||||
|
parsing problems when trying to reuse it as input. Fix for bug
|
||||||
|
reported by isabella parakiss <izaberina@gmail.com>
|
||||||
|
|
||||||
|
8/14
|
||||||
|
----
|
||||||
|
lib/readline/text.c
|
||||||
|
- rl_insert: when optimizing typeahead, make sure we set rl_last_func
|
||||||
|
ourselves if we set pending input, since the mainline code path
|
||||||
|
won't set rl_last_func if input is pending. Fixes bug reported by
|
||||||
|
Hiroo Hayashi <hiroo.hayashi@computer.org>
|
||||||
|
|
||||||
|
8/15
|
||||||
|
----
|
||||||
|
builtins/type.def
|
||||||
|
- describe_command: if using the short description (CDESC_SHORTDESC) in
|
||||||
|
posix mode, describe posix special builtins as such. Requested by
|
||||||
|
Stephane Chazelas <stephane.chazelas@gmail.com>
|
||||||
|
|
||||||
|
builtins/enable.def
|
||||||
|
- BASH_LOADABLES_PATH: a colon-separated list of directories where bash
|
||||||
|
looks for loadable builtins specified as arguments to `enable -f'
|
||||||
|
|
||||||
|
doc/{bash.1,bashref.texi}
|
||||||
|
- BASH_LOADABLES_PATH: document new shell variable
|
||||||
|
|
||||||
|
configure.ac,Makefile.in,builtins/Makefile.in
|
||||||
|
- loadablesdir: set in configure, substitute into Makefiles. Reserved
|
||||||
|
for future use
|
||||||
|
|||||||
+3
-1
@@ -1,4 +1,4 @@
|
|||||||
# Makefile for bash-4.4, version 4.14
|
# Makefile for bash-4.4, version 4.15
|
||||||
#
|
#
|
||||||
# Copyright (C) 1996-2015 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2015 Free Software Foundation, Inc.
|
||||||
|
|
||||||
@@ -42,6 +42,8 @@ includedir = @includedir@
|
|||||||
datadir = @datadir@
|
datadir = @datadir@
|
||||||
localedir = @localedir@
|
localedir = @localedir@
|
||||||
|
|
||||||
|
loadablesdir = @loadablesdir@
|
||||||
|
|
||||||
docdir = @docdir@
|
docdir = @docdir@
|
||||||
|
|
||||||
mandir = @mandir@
|
mandir = @mandir@
|
||||||
|
|||||||
+13
@@ -730,11 +730,24 @@ check_add_history (line, force)
|
|||||||
#if defined (SYSLOG_HISTORY)
|
#if defined (SYSLOG_HISTORY)
|
||||||
#define SYSLOG_MAXLEN 600
|
#define SYSLOG_MAXLEN 600
|
||||||
|
|
||||||
|
extern char *shell_name;
|
||||||
|
|
||||||
|
#ifndef OPENLOG_OPTS
|
||||||
|
#define OPENLOG_OPTS 0
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
bash_syslog_history (line)
|
bash_syslog_history (line)
|
||||||
const char *line;
|
const char *line;
|
||||||
{
|
{
|
||||||
char trunc[SYSLOG_MAXLEN];
|
char trunc[SYSLOG_MAXLEN];
|
||||||
|
static int first = 1;
|
||||||
|
|
||||||
|
if (first)
|
||||||
|
{
|
||||||
|
openlog (shell_name, OPENLOG_OPTS, SYSLOG_FACILITY);
|
||||||
|
first = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (strlen(line) < SYSLOG_MAXLEN)
|
if (strlen(line) < SYSLOG_MAXLEN)
|
||||||
syslog (SYSLOG_FACILITY|SYSLOG_LEVEL, "HISTORY: PID=%d UID=%d %s", getpid(), current_user.uid, line);
|
syslog (SYSLOG_FACILITY|SYSLOG_LEVEL, "HISTORY: PID=%d UID=%d %s", getpid(), current_user.uid, line);
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ includedir = @includedir@
|
|||||||
datadir = @datadir@
|
datadir = @datadir@
|
||||||
localedir = @localedir@
|
localedir = @localedir@
|
||||||
|
|
||||||
|
loadablesdir = @loadablesdir@
|
||||||
|
|
||||||
# Support an alternate destination root directory for package building
|
# Support an alternate destination root directory for package building
|
||||||
DESTDIR =
|
DESTDIR =
|
||||||
|
|
||||||
|
|||||||
+25
-2
@@ -66,6 +66,7 @@ $END
|
|||||||
#include "../flags.h"
|
#include "../flags.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "bashgetopt.h"
|
#include "bashgetopt.h"
|
||||||
|
#include "findcmd.h"
|
||||||
|
|
||||||
#if defined (PROGRAMMABLE_COMPLETION)
|
#if defined (PROGRAMMABLE_COMPLETION)
|
||||||
# include "../pcomplete.h"
|
# include "../pcomplete.h"
|
||||||
@@ -299,6 +300,7 @@ dyn_load_builtin (list, flags, filename)
|
|||||||
char *struct_name, *name, *funcname;
|
char *struct_name, *name, *funcname;
|
||||||
sh_load_func_t *loadfunc;
|
sh_load_func_t *loadfunc;
|
||||||
struct builtin **new_builtins, *b, *new_shell_builtins, *old_builtin;
|
struct builtin **new_builtins, *b, *new_shell_builtins, *old_builtin;
|
||||||
|
char *loadables_path, *load_path;
|
||||||
|
|
||||||
if (list == 0)
|
if (list == 0)
|
||||||
return (EXECUTION_FAILURE);
|
return (EXECUTION_FAILURE);
|
||||||
@@ -307,10 +309,31 @@ dyn_load_builtin (list, flags, filename)
|
|||||||
#define RTLD_LAZY 1
|
#define RTLD_LAZY 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
handle = 0;
|
||||||
|
if (absolute_program (filename) == 0)
|
||||||
|
{
|
||||||
|
loadables_path = get_string_value ("BASH_LOADABLES_PATH");
|
||||||
|
if (loadables_path)
|
||||||
|
{
|
||||||
|
load_path = find_in_path (filename, loadables_path, FS_NODIRS|FS_EXEC_PREFERRED);
|
||||||
|
if (load_path)
|
||||||
|
{
|
||||||
#if defined (_AIX)
|
#if defined (_AIX)
|
||||||
handle = dlopen (filename, RTLD_NOW|RTLD_GLOBAL);
|
handle = dlopen (load_path, RTLD_NOW|RTLD_GLOBAL);
|
||||||
#else
|
#else
|
||||||
handle = dlopen (filename, RTLD_LAZY);
|
handle = dlopen (load_path, RTLD_LAZY);
|
||||||
|
#endif /* !_AIX */
|
||||||
|
free (load_path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fall back to current directory for now */
|
||||||
|
if (handle == 0)
|
||||||
|
#if defined (_AIX)
|
||||||
|
handle = dlopen (filename, RTLD_NOW|RTLD_GLOBAL);
|
||||||
|
#else
|
||||||
|
handle = dlopen (filename, RTLD_LAZY);
|
||||||
#endif /* !_AIX */
|
#endif /* !_AIX */
|
||||||
|
|
||||||
if (handle == 0)
|
if (handle == 0)
|
||||||
|
|||||||
+6
-1
@@ -294,7 +294,12 @@ describe_command (command, dflags)
|
|||||||
if (dflags & CDESC_TYPE)
|
if (dflags & CDESC_TYPE)
|
||||||
puts ("builtin");
|
puts ("builtin");
|
||||||
else if (dflags & CDESC_SHORTDESC)
|
else if (dflags & CDESC_SHORTDESC)
|
||||||
printf (_("%s is a shell builtin\n"), command);
|
{
|
||||||
|
if (posixly_correct && find_special_builtin (command) != 0)
|
||||||
|
printf (_("%s is a special shell builtin\n"), command);
|
||||||
|
else
|
||||||
|
printf (_("%s is a shell builtin\n"), command);
|
||||||
|
}
|
||||||
else if (dflags & CDESC_REUSABLE)
|
else if (dflags & CDESC_REUSABLE)
|
||||||
printf ("%s\n", command);
|
printf ("%s\n", command);
|
||||||
|
|
||||||
|
|||||||
@@ -113,6 +113,7 @@
|
|||||||
#if defined (SYSLOG_HISTORY)
|
#if defined (SYSLOG_HISTORY)
|
||||||
# define SYSLOG_FACILITY LOG_USER
|
# define SYSLOG_FACILITY LOG_USER
|
||||||
# define SYSLOG_LEVEL LOG_INFO
|
# define SYSLOG_LEVEL LOG_INFO
|
||||||
|
# define OPENLOG_OPTS LOG_PID
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define if you want to include code in shell.c to support wordexp(3) */
|
/* Define if you want to include code in shell.c to support wordexp(3) */
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# From configure.ac for Bash 4.4, version 4.071.
|
# From configure.ac for Bash 4.4, version 4.072.
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.69 for bash 4.4-alpha.
|
# Generated by GNU Autoconf 2.69 for bash 4.4-alpha.
|
||||||
#
|
#
|
||||||
@@ -635,6 +635,7 @@ DEBUG
|
|||||||
RELSTATUS
|
RELSTATUS
|
||||||
BASHVERS
|
BASHVERS
|
||||||
ARFLAGS
|
ARFLAGS
|
||||||
|
loadablesdir
|
||||||
BUILD_DIR
|
BUILD_DIR
|
||||||
incdir
|
incdir
|
||||||
PROFILE_FLAGS
|
PROFILE_FLAGS
|
||||||
@@ -16116,6 +16117,12 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# directory where we install dynamically loadable builtins
|
||||||
|
if test -z "$loadablesdir"; then
|
||||||
|
loadablesdir='${libdir}/bash'
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+7
-1
@@ -21,7 +21,7 @@ dnl Process this file with autoconf to produce a configure script.
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
AC_REVISION([for Bash 4.4, version 4.071])dnl
|
AC_REVISION([for Bash 4.4, version 4.072])dnl
|
||||||
|
|
||||||
define(bashvers, 4.4)
|
define(bashvers, 4.4)
|
||||||
define(relstatus, alpha)
|
define(relstatus, alpha)
|
||||||
@@ -1191,6 +1191,12 @@ AC_SUBST(BUILD_DIR)
|
|||||||
AC_SUBST(datarootdir)
|
AC_SUBST(datarootdir)
|
||||||
AC_SUBST(localedir)
|
AC_SUBST(localedir)
|
||||||
|
|
||||||
|
# directory where we install dynamically loadable builtins
|
||||||
|
if test -z "$loadablesdir"; then
|
||||||
|
loadablesdir='${libdir}/bash'
|
||||||
|
fi
|
||||||
|
AC_SUBST(loadablesdir)
|
||||||
|
|
||||||
AC_SUBST(YACC)
|
AC_SUBST(YACC)
|
||||||
AC_SUBST(AR)
|
AC_SUBST(AR)
|
||||||
AC_SUBST(ARFLAGS)
|
AC_SUBST(ARFLAGS)
|
||||||
|
|||||||
+13
-7
@@ -5,12 +5,12 @@
|
|||||||
.\" Case Western Reserve University
|
.\" Case Western Reserve University
|
||||||
.\" chet.ramey@case.edu
|
.\" chet.ramey@case.edu
|
||||||
.\"
|
.\"
|
||||||
.\" Last Change: Fri Jul 31 11:16:37 EDT 2015
|
.\" Last Change: Sat Aug 15 15:17:33 EDT 2015
|
||||||
.\"
|
.\"
|
||||||
.\" bash_builtins, strip all but Built-Ins section
|
.\" bash_builtins, strip all but Built-Ins section
|
||||||
.if \n(zZ=1 .ig zZ
|
.if \n(zZ=1 .ig zZ
|
||||||
.if \n(zY=1 .ig zY
|
.if \n(zY=1 .ig zY
|
||||||
.TH BASH 1 "2015 July 31" "GNU Bash 4.4"
|
.TH BASH 1 "2015 August 15" "GNU Bash 4.4"
|
||||||
.\"
|
.\"
|
||||||
.\" There's some problem with having a `@'
|
.\" There's some problem with having a `@'
|
||||||
.\" in a tagged paragraph with the BSD man macros.
|
.\" in a tagged paragraph with the BSD man macros.
|
||||||
@@ -1520,6 +1520,12 @@ Use
|
|||||||
.B LINENO
|
.B LINENO
|
||||||
to obtain the current line number.
|
to obtain the current line number.
|
||||||
.TP
|
.TP
|
||||||
|
.B BASH_LOADABLES_PATH
|
||||||
|
A colon-separated list of directories in which the shell looks for
|
||||||
|
dynamically loadable builtins specified by the
|
||||||
|
.B enable
|
||||||
|
command.
|
||||||
|
.TP
|
||||||
.B BASH_REMATCH
|
.B BASH_REMATCH
|
||||||
An array variable whose members are assigned by the \fB=~\fP binary
|
An array variable whose members are assigned by the \fB=~\fP binary
|
||||||
operator to the \fB[[\fP conditional command.
|
operator to the \fB[[\fP conditional command.
|
||||||
@@ -1681,7 +1687,7 @@ This variable exists only when a shell function is executing.
|
|||||||
Assignments to
|
Assignments to
|
||||||
.SM
|
.SM
|
||||||
.B FUNCNAME
|
.B FUNCNAME
|
||||||
have no effect and return an error status.
|
have no effect.
|
||||||
If
|
If
|
||||||
.SM
|
.SM
|
||||||
.B FUNCNAME
|
.B FUNCNAME
|
||||||
@@ -1704,7 +1710,7 @@ user is a member.
|
|||||||
Assignments to
|
Assignments to
|
||||||
.SM
|
.SM
|
||||||
.B GROUPS
|
.B GROUPS
|
||||||
have no effect and return an error status.
|
have no effect.
|
||||||
If
|
If
|
||||||
.SM
|
.SM
|
||||||
.B GROUPS
|
.B GROUPS
|
||||||
@@ -8656,15 +8662,15 @@ The return value is zero on success, non-zero on failure.
|
|||||||
.PD
|
.PD
|
||||||
Adds a directory to the top of the directory stack, or rotates
|
Adds a directory to the top of the directory stack, or rotates
|
||||||
the stack, making the new top of the stack the current working
|
the stack, making the new top of the stack the current working
|
||||||
directory. With no arguments, exchanges the top two directories
|
directory. With no arguments, \fBpushd\fP exchanges the top two directories
|
||||||
and returns 0, unless the directory stack is empty.
|
and returns 0, unless the directory stack is empty.
|
||||||
Arguments, if supplied, have the following meanings:
|
Arguments, if supplied, have the following meanings:
|
||||||
.RS
|
.RS
|
||||||
.PD 0
|
.PD 0
|
||||||
.TP
|
.TP
|
||||||
.B \-n
|
.B \-n
|
||||||
Suppresses the normal change of directory when adding directories
|
Suppresses the normal change of directory when rotating or
|
||||||
to the stack, so that only the stack is manipulated.
|
adding directories to the stack, so that only the stack is manipulated.
|
||||||
.TP
|
.TP
|
||||||
\fB+\fP\fIn\fP
|
\fB+\fP\fIn\fP
|
||||||
Rotates the stack so that the \fIn\fPth directory
|
Rotates the stack so that the \fIn\fPth directory
|
||||||
|
|||||||
+16
-11
@@ -5503,6 +5503,11 @@ where each corresponding member of @var{FUNCNAME} was invoked.
|
|||||||
referenced within another shell function).
|
referenced within another shell function).
|
||||||
Use @code{LINENO} to obtain the current line number.
|
Use @code{LINENO} to obtain the current line number.
|
||||||
|
|
||||||
|
@item BASH_LOADABLES_PATH
|
||||||
|
A colon-separated list of directories in which the shell looks for
|
||||||
|
dynamically loadable builtins specified by the
|
||||||
|
@code{enable} command.
|
||||||
|
|
||||||
@item BASH_REMATCH
|
@item BASH_REMATCH
|
||||||
An array variable whose members are assigned by the @samp{=~} binary
|
An array variable whose members are assigned by the @samp{=~} binary
|
||||||
operator to the @code{[[} conditional command
|
operator to the @code{[[} conditional command
|
||||||
@@ -5698,7 +5703,7 @@ shell function.
|
|||||||
The bottom-most element (the one with the highest index)
|
The bottom-most element (the one with the highest index)
|
||||||
is @code{"main"}.
|
is @code{"main"}.
|
||||||
This variable exists only when a shell function is executing.
|
This variable exists only when a shell function is executing.
|
||||||
Assignments to @env{FUNCNAME} have no effect and return an error status.
|
Assignments to @env{FUNCNAME} have no effect.
|
||||||
If @env{FUNCNAME} is unset, it loses its special properties, even if
|
If @env{FUNCNAME} is unset, it loses its special properties, even if
|
||||||
it is subsequently reset.
|
it is subsequently reset.
|
||||||
|
|
||||||
@@ -5725,7 +5730,7 @@ of matches.
|
|||||||
@item GROUPS
|
@item GROUPS
|
||||||
An array variable containing the list of groups of which the current
|
An array variable containing the list of groups of which the current
|
||||||
user is a member.
|
user is a member.
|
||||||
Assignments to @env{GROUPS} have no effect and return an error status.
|
Assignments to @env{GROUPS} have no effect.
|
||||||
If @env{GROUPS} is unset, it loses its special properties, even if it is
|
If @env{GROUPS} is unset, it loses its special properties, even if it is
|
||||||
subsequently reset.
|
subsequently reset.
|
||||||
|
|
||||||
@@ -6992,6 +6997,7 @@ The directory stack is a list of recently-visited directories. The
|
|||||||
the current directory, and the @code{popd} builtin removes specified
|
the current directory, and the @code{popd} builtin removes specified
|
||||||
directories from the stack and changes the current directory to
|
directories from the stack and changes the current directory to
|
||||||
the directory removed. The @code{dirs} builtin displays the contents
|
the directory removed. The @code{dirs} builtin displays the contents
|
||||||
|
of the directory stack. The current directory is always the "top"
|
||||||
of the directory stack.
|
of the directory stack.
|
||||||
|
|
||||||
The contents of the directory stack are also visible
|
The contents of the directory stack are also visible
|
||||||
@@ -7040,13 +7046,11 @@ with zero.
|
|||||||
popd [-n] [+@var{N} | -@var{N}]
|
popd [-n] [+@var{N} | -@var{N}]
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
Remove the top entry from the directory stack, and @code{cd}
|
|
||||||
to the new top directory.
|
|
||||||
When no arguments are given, @code{popd}
|
When no arguments are given, @code{popd}
|
||||||
removes the top directory from the stack and
|
removes the top directory from the stack and
|
||||||
performs a @code{cd} to the new top directory. The
|
performs a @code{cd} to the new top directory.
|
||||||
elements are numbered from 0 starting at the first directory listed with
|
The elements are numbered from 0 starting at the first directory
|
||||||
@code{dirs}; that is, @code{popd} is equivalent to @code{popd +0}.
|
listed with @code{dirs}; that is, @code{popd} is equivalent to @code{popd +0}.
|
||||||
|
|
||||||
@table @code
|
@table @code
|
||||||
@item -n
|
@item -n
|
||||||
@@ -7068,12 +7072,13 @@ pushd [-n] [@var{+N} | @var{-N} | @var{dir}]
|
|||||||
|
|
||||||
Save the current directory on the top of the directory stack
|
Save the current directory on the top of the directory stack
|
||||||
and then @code{cd} to @var{dir}.
|
and then @code{cd} to @var{dir}.
|
||||||
With no arguments, @code{pushd} exchanges the top two directories.
|
With no arguments, @code{pushd} exchanges the top two directories
|
||||||
|
and makes the new top the current directory.
|
||||||
|
|
||||||
@table @code
|
@table @code
|
||||||
@item -n
|
@item -n
|
||||||
Suppresses the normal change of directory when adding directories
|
Suppresses the normal change of directory when rotating or
|
||||||
to the stack, so that only the stack is manipulated.
|
adding directories to the stack, so that only the stack is manipulated.
|
||||||
@item +@var{N}
|
@item +@var{N}
|
||||||
Brings the @var{N}th directory (counting from the left of the
|
Brings the @var{N}th directory (counting from the left of the
|
||||||
list printed by @code{dirs}, starting with zero) to the top of
|
list printed by @code{dirs}, starting with zero) to the top of
|
||||||
@@ -7083,7 +7088,7 @@ Brings the @var{N}th directory (counting from the right of the
|
|||||||
list printed by @code{dirs}, starting with zero) to the top of
|
list printed by @code{dirs}, starting with zero) to the top of
|
||||||
the list by rotating the stack.
|
the list by rotating the stack.
|
||||||
@item @var{dir}
|
@item @var{dir}
|
||||||
Makes the current working directory be the top of the stack, making
|
Makes @var{dir} be the top of the stack, making
|
||||||
it the new current directory as if it had been supplied as an argument
|
it the new current directory as if it had been supplied as an argument
|
||||||
to the @code{cd} builtin.
|
to the @code{cd} builtin.
|
||||||
@end table
|
@end table
|
||||||
|
|||||||
+3
-3
@@ -2,10 +2,10 @@
|
|||||||
Copyright (C) 1988-2015 Free Software Foundation, Inc.
|
Copyright (C) 1988-2015 Free Software Foundation, Inc.
|
||||||
@end ignore
|
@end ignore
|
||||||
|
|
||||||
@set LASTCHANGE Fri Jul 31 11:16:22 EDT 2015
|
@set LASTCHANGE Sat Aug 15 15:17:52 EDT 2015
|
||||||
|
|
||||||
@set EDITION 4.4
|
@set EDITION 4.4
|
||||||
@set VERSION 4.4
|
@set VERSION 4.4
|
||||||
|
|
||||||
@set UPDATED 31 July 2015
|
@set UPDATED 15 August 2015
|
||||||
@set UPDATED-MONTH July 2015
|
@set UPDATED-MONTH August 2015
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ infodir = @infodir@
|
|||||||
includedir = @includedir@
|
includedir = @includedir@
|
||||||
|
|
||||||
datarootdir = @datarootdir@
|
datarootdir = @datarootdir@
|
||||||
loadablesdir = ${libdir}/bash
|
loadablesdir = @loadablesdir@
|
||||||
|
|
||||||
topdir = @top_srcdir@
|
topdir = @top_srcdir@
|
||||||
BUILD_DIR = @BUILD_DIR@
|
BUILD_DIR = @BUILD_DIR@
|
||||||
|
|||||||
@@ -323,7 +323,7 @@ static SigHandler *old_tstp, *old_ttou, *old_ttin;
|
|||||||
static SigHandler *old_cont = (SigHandler *)SIG_DFL;
|
static SigHandler *old_cont = (SigHandler *)SIG_DFL;
|
||||||
|
|
||||||
/* A place to temporarily save the current pipeline. */
|
/* A place to temporarily save the current pipeline. */
|
||||||
static PROCESS *saved_pipeline;
|
static struct pipeline_saver *saved_pipeline;
|
||||||
static int saved_already_making_children;
|
static int saved_already_making_children;
|
||||||
|
|
||||||
/* Set this to non-zero whenever you don't want the jobs list to change at
|
/* Set this to non-zero whenever you don't want the jobs list to change at
|
||||||
@@ -435,14 +435,29 @@ cleanup_the_pipeline ()
|
|||||||
discard_pipeline (disposer);
|
discard_pipeline (disposer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct pipeline_saver *
|
||||||
|
alloc_pipeline_saver ()
|
||||||
|
{
|
||||||
|
struct pipeline_saver *ret;
|
||||||
|
|
||||||
|
ret = (struct pipeline_saver *)xmalloc (sizeof (struct pipeline_saver));
|
||||||
|
ret->pipeline = 0;
|
||||||
|
ret->next = 0;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
save_pipeline (clear)
|
save_pipeline (clear)
|
||||||
int clear;
|
int clear;
|
||||||
{
|
{
|
||||||
sigset_t set, oset;
|
sigset_t set, oset;
|
||||||
|
struct pipeline_saver *saver;
|
||||||
|
|
||||||
BLOCK_CHILD (set, oset);
|
BLOCK_CHILD (set, oset);
|
||||||
saved_pipeline = the_pipeline;
|
saver = alloc_pipeline_saver ();
|
||||||
|
saver->pipeline = the_pipeline;
|
||||||
|
saver->next = saved_pipeline;
|
||||||
|
saved_pipeline = saver;
|
||||||
if (clear)
|
if (clear)
|
||||||
the_pipeline = (PROCESS *)NULL;
|
the_pipeline = (PROCESS *)NULL;
|
||||||
saved_already_making_children = already_making_children;
|
saved_already_making_children = already_making_children;
|
||||||
@@ -455,10 +470,14 @@ restore_pipeline (discard)
|
|||||||
{
|
{
|
||||||
PROCESS *old_pipeline;
|
PROCESS *old_pipeline;
|
||||||
sigset_t set, oset;
|
sigset_t set, oset;
|
||||||
|
struct pipeline_saver *saver;
|
||||||
|
|
||||||
BLOCK_CHILD (set, oset);
|
BLOCK_CHILD (set, oset);
|
||||||
old_pipeline = the_pipeline;
|
old_pipeline = the_pipeline;
|
||||||
the_pipeline = saved_pipeline;
|
the_pipeline = saved_pipeline->pipeline;
|
||||||
|
saver = saved_pipeline;
|
||||||
|
saved_pipeline = saved_pipeline->next;
|
||||||
|
free (saver);
|
||||||
already_making_children = saved_already_making_children;
|
already_making_children = saved_already_making_children;
|
||||||
UNBLOCK_CHILD (oset);
|
UNBLOCK_CHILD (oset);
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,11 @@ typedef struct process {
|
|||||||
char *command; /* The particular program that is running. */
|
char *command; /* The particular program that is running. */
|
||||||
} PROCESS;
|
} PROCESS;
|
||||||
|
|
||||||
|
struct pipeline_saver {
|
||||||
|
struct process *pipeline;
|
||||||
|
struct pipeline_saver *next;
|
||||||
|
};
|
||||||
|
|
||||||
/* PALIVE really means `not exited' */
|
/* PALIVE really means `not exited' */
|
||||||
#define PSTOPPED(p) (WIFSTOPPED((p)->status))
|
#define PSTOPPED(p) (WIFSTOPPED((p)->status))
|
||||||
#define PRUNNING(p) ((p)->running == PS_RUNNING)
|
#define PRUNNING(p) ((p)->running == PS_RUNNING)
|
||||||
|
|||||||
+6
-1
@@ -925,7 +925,12 @@ rl_insert (count, c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (n != (unsigned short)-2) /* -2 = sentinel value for having inserted N */
|
if (n != (unsigned short)-2) /* -2 = sentinel value for having inserted N */
|
||||||
r = rl_execute_next (n);
|
{
|
||||||
|
/* setting rl_pending_input inhibits setting rl_last_func so we do it
|
||||||
|
ourselves here */
|
||||||
|
rl_last_func = rl_insert;
|
||||||
|
r = rl_execute_next (n);
|
||||||
|
}
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-1
@@ -1339,7 +1339,11 @@ named_function_string (name, command, flags)
|
|||||||
deferred_heredocs = 0;
|
deferred_heredocs = 0;
|
||||||
|
|
||||||
if (name && *name)
|
if (name && *name)
|
||||||
cprintf ("%s ", name);
|
{
|
||||||
|
if (find_reserved_word (name) >= 0)
|
||||||
|
cprintf ("function ");
|
||||||
|
cprintf ("%s ", name);
|
||||||
|
}
|
||||||
|
|
||||||
cprintf ("() ");
|
cprintf ("() ");
|
||||||
|
|
||||||
|
|||||||
@@ -6313,6 +6313,16 @@ parameter_brace_expand_indir (name, var_is_special, quoted, quoted_dollar_atp, c
|
|||||||
if (t == 0)
|
if (t == 0)
|
||||||
return (WORD_DESC *)NULL;
|
return (WORD_DESC *)NULL;
|
||||||
|
|
||||||
|
if (valid_brace_expansion_word (t, SPECIAL_VAR (t, 0)) == 0)
|
||||||
|
{
|
||||||
|
report_error (_("%s: bad substitution"), t);
|
||||||
|
free (t);
|
||||||
|
w = alloc_word_desc ();
|
||||||
|
w->word = &expand_param_error;
|
||||||
|
w->flags = 0;
|
||||||
|
return (w);
|
||||||
|
}
|
||||||
|
|
||||||
w = parameter_brace_expand_word (t, SPECIAL_VAR(t, 0), quoted, 0, 0);
|
w = parameter_brace_expand_word (t, SPECIAL_VAR(t, 0), quoted, 0, 0);
|
||||||
free (t);
|
free (t);
|
||||||
|
|
||||||
@@ -7827,6 +7837,11 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta
|
|||||||
if (want_indir)
|
if (want_indir)
|
||||||
{
|
{
|
||||||
tdesc = parameter_brace_expand_indir (name + 1, var_is_special, quoted, quoted_dollar_atp, contains_dollar_at);
|
tdesc = parameter_brace_expand_indir (name + 1, var_is_special, quoted, quoted_dollar_atp, contains_dollar_at);
|
||||||
|
if (tdesc == &expand_wdesc_error || tdesc == &expand_wdesc_fatal)
|
||||||
|
{
|
||||||
|
temp = (char *)NULL;
|
||||||
|
goto bad_substitution;
|
||||||
|
}
|
||||||
/* Turn off the W_ARRAYIND flag because there is no way for this function
|
/* Turn off the W_ARRAYIND flag because there is no way for this function
|
||||||
to return the index we're supposed to be using. */
|
to return the index we're supposed to be using. */
|
||||||
if (tdesc && tdesc->flags)
|
if (tdesc && tdesc->flags)
|
||||||
|
|||||||
@@ -320,6 +320,7 @@ run_pending_traps ()
|
|||||||
while (pending_traps[sig]--) instead of the if statement. */
|
while (pending_traps[sig]--) instead of the if statement. */
|
||||||
if (pending_traps[sig])
|
if (pending_traps[sig])
|
||||||
{
|
{
|
||||||
|
itrace("run_pending_traps: %d: %d", sig, pending_traps[sig]);
|
||||||
if (running_trap == sig+1)
|
if (running_trap == sig+1)
|
||||||
/*continue*/;
|
/*continue*/;
|
||||||
|
|
||||||
@@ -403,6 +404,7 @@ run_pending_traps ()
|
|||||||
/* XXX - set pending_traps[sig] = 0 here? */
|
/* XXX - set pending_traps[sig] = 0 here? */
|
||||||
pending_traps[sig] = 0;
|
pending_traps[sig] = 0;
|
||||||
evalstring (savestring (trap_list[sig]), "trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE);
|
evalstring (savestring (trap_list[sig]), "trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE);
|
||||||
|
itrace("run_pending_traps: evalstring returns");
|
||||||
#if defined (JOB_CONTROL)
|
#if defined (JOB_CONTROL)
|
||||||
restore_pipeline (1);
|
restore_pipeline (1);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user