mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-23 13:57:58 +02:00
commit bash-20091008 snapshot
This commit is contained in:
@@ -1,3 +1,288 @@
|
||||
This document details the changes between this version, bash-4.1-alpha,
|
||||
and the previous version, bash-4.0-release.
|
||||
|
||||
1. Changes to Bash
|
||||
|
||||
a. Fixed bugs in the parser involving new parsing of the commands contained
|
||||
in command substitution when the substitution is read.
|
||||
|
||||
b. Fixed a bug that caused the shell to dump core when performing programmable
|
||||
completion using a shell function.
|
||||
|
||||
c. Fixed a bug in `mapfile' that caused it to invoke callbacks at the wrong
|
||||
time.
|
||||
|
||||
d. Fixed a bug that caused the shell to dump core when listing jobs in the
|
||||
`exit' builtin.
|
||||
|
||||
e. Fixed several bugs encountered when reading subscripts in associative
|
||||
array assignments and expansions.
|
||||
|
||||
f. Fixed a bug that under some circumstances caused an associative array to
|
||||
be converted to an indexed array.
|
||||
|
||||
g. Fixed a bug that caused syntax errors and SIGINT interrupts to not set
|
||||
$? to a value > 128.
|
||||
|
||||
h. Fixed a bug that caused the shell to remove FIFOs associated with process
|
||||
substitution inside shell functions.
|
||||
|
||||
i. Fixed a bug that caused terminal attributes to not be reset when the
|
||||
`read' builtin timed out.
|
||||
|
||||
j. Fixed a bug in brace expansion that caused unwanted zero padding of the
|
||||
expanded terms.
|
||||
|
||||
k. Fixed a bug that prevented the |& construct from working as intended when
|
||||
used with a simple command with additional redirections.
|
||||
|
||||
l. Fixed a bug with the case statment ;& terminator that caused the shell to
|
||||
dereference a NULL pointer.
|
||||
|
||||
m. Fixed a bug that caused assignment statements or redirections preceding
|
||||
a simple command name to inhibit alias expansion.
|
||||
|
||||
n. Fixed the behavior of `set -u' to conform to the latest Posix interpretation:
|
||||
every expansion of an unset variable except $@ and $* will cause the
|
||||
shell to exit.
|
||||
|
||||
o. Fixed a bug that caused double-quoted expansions of $* inside word
|
||||
expansions like ${x#$*} to not expand properly when $IFS is empty.
|
||||
|
||||
p. Fixed a bug that caused traps to set $LINENO to the wrong value when they
|
||||
execute.
|
||||
|
||||
q. Fixed a bug that caused off-by-one errors when computing history lines in
|
||||
the `fc' builtin.
|
||||
|
||||
r. Fixed a bug that caused some terminating signals to not exit the shell
|
||||
quickly enough, forcing the kernel to send the signal (e.g., SIGSEGV)
|
||||
multiple times.
|
||||
|
||||
s. Fixed a bug that caused the shell to attempt to add empty lines to the
|
||||
history list when reading here documents.
|
||||
|
||||
t. Made some internal changes that dramatically speeds up sequential indexed
|
||||
array access.
|
||||
|
||||
u. Fixed a bug that caused the shell to write past the end of a string when
|
||||
completing a double-quoted string ending in a backslash.
|
||||
|
||||
v. Fixed a bug that caused the shell to replace too many characters when a
|
||||
pattern match was null in a ${foo//bar} expansion.
|
||||
|
||||
w. Fixed bugs in the expansion of ** that caused duplicate directory names
|
||||
and the contents of the current directory to be omitted.
|
||||
|
||||
x. Fixed a bug that caused $? to not be set correctly when referencing an
|
||||
unset variable with set -u and set -e enabled.
|
||||
|
||||
y. Fixed a bug caused by executing an external program from the DEBUG trap
|
||||
while a pipeline was running. The effect was to disturb the pipeline
|
||||
state, occasionally causing it to hang.
|
||||
|
||||
z. Fixed a bug that caused the ** glob expansion to dump core if it
|
||||
encountered an unsearchable directory.
|
||||
|
||||
aa. Fixed a bug that caused `command -v' and `command -V' to not honor the
|
||||
path set by the -p option.
|
||||
|
||||
bb. Fixed a bug that caused brace expansion to take place too soon in some
|
||||
compound array assignments.
|
||||
|
||||
cc. Fixed a bug that caused programmable completion functions' changes to
|
||||
READLINE_POINT to not be reflected back to readline.
|
||||
|
||||
dd. Fixed a bug that caused the shell to dump core if a trap was executed
|
||||
during a shell assignment statement.
|
||||
|
||||
ee. Fixed an off-by-one error when computing the number of positional
|
||||
parameters for the ${@:0:n} expansion.
|
||||
|
||||
ff. Fixed a problem with setting COMP_CWORD for programmable completion
|
||||
functions that could leave it set to -1.
|
||||
|
||||
gg. Fixed a bug that caused the ERR trap to be triggered in some cases where
|
||||
`set -e' would not have caused the shell to exit.
|
||||
|
||||
hh. Fixed a bug that caused changes made by `compopt' to not persist past the
|
||||
completion function in which compopt was executed.
|
||||
|
||||
ii. Fixed a bug that caused the list of hostname completions to not be cleared
|
||||
when HOSTNAME was unset.
|
||||
|
||||
jj. Fixed a bug that caused variable expansion in here documents to look in
|
||||
any temporary environment.
|
||||
|
||||
kk. Bash and readline can now convert file names between precomposed and
|
||||
decomposed Unicode on Mac OS X ("keyboard" and file system forms,
|
||||
respectively). This affects filename completion (using new
|
||||
rl_filename_rewrite_hook), globbing, and readline redisplay.
|
||||
|
||||
ll. The ERR and EXIT traps now see a non-zero value for $? when a parser
|
||||
error after set -e has been enabled causes the shell to exit.
|
||||
|
||||
mm. Fixed a bug that in brace expansion that caused zero-prefixed terms to
|
||||
not contain the correct number of digits.
|
||||
|
||||
nn. Fixed a bug that caused the shell to free non-allocated memory when
|
||||
unsetting an associative array which had had a value implicitly assigned
|
||||
to index "0".
|
||||
|
||||
oo. Fixed a memory leak in the ${!prefix@} expansion.
|
||||
|
||||
pp. Fixed a bug that caused printf to not correctly report all write errors.
|
||||
|
||||
qq. Fixed a bug that caused single and double quotes to act as delimiters
|
||||
when splitting a command line into words for programmable completion.
|
||||
|
||||
rr. Fixed a bug that caused ** globbing that caused **/path/* to match every
|
||||
directory, not just those matching `path'.
|
||||
|
||||
ss. Fixed a bug that caused the shell to dump core when running `help' without
|
||||
arguments if the terminal width was fewer than 7 characters.
|
||||
|
||||
2. Changes to Readline
|
||||
|
||||
a. The SIGWINCH signal handler now avoids calling the redisplay code if
|
||||
one arrives while in the middle of redisplay.
|
||||
|
||||
b. Changes to the timeout code to make sure that timeout values greater
|
||||
than one second are handled better.
|
||||
|
||||
c. Fixed a bug in the redisplay code that was triggered by a prompt
|
||||
containing invisible characters exactly the width of the screen.
|
||||
|
||||
d. Fixed a bug in the redisplay code encountered when running in horizontal
|
||||
scroll mode.
|
||||
|
||||
e. Fixed a bug that prevented menu completion from properly completing
|
||||
filenames.
|
||||
|
||||
f. Fixed a redisplay bug caused by a multibyte character causing a line to
|
||||
wrap.
|
||||
|
||||
g. Fixed a bug that caused key sequences of two characters to not be
|
||||
recognized when a longer sequence identical in the first two characters
|
||||
was bound.
|
||||
|
||||
h. Fixed a bug that caused history expansion to be attempted on $'...'
|
||||
single-quoted strings.
|
||||
|
||||
i. Fixed a bug that caused incorrect redisplay when the prompt contained
|
||||
multibyte characters in an `invisible' sequence bracketed by \[ and
|
||||
\].
|
||||
|
||||
j. Fixed a bug that caused history expansion to short-circuit after
|
||||
encountering a multibyte character.
|
||||
|
||||
3. New Features in Bash
|
||||
|
||||
a. Here-documents within $(...) command substitutions may once more be
|
||||
delimited by the closing right paren, instead of requiring a newline.
|
||||
|
||||
b. Bash's file status checks (executable, readable, etc.) now take file
|
||||
system ACLs into account on file systems that support them.
|
||||
|
||||
c. Bash now passes environment variables with names that are not valid
|
||||
shell variable names through into the environment passed to child
|
||||
processes.
|
||||
|
||||
d. The `execute-unix-command' readline function now attempts to clear and
|
||||
reuse the current line rather than move to a new one after the command
|
||||
executes.
|
||||
|
||||
e. `printf -v' can now assign values to array indices.
|
||||
|
||||
f. New `complete -E' and `compopt -E' options that work on the "empty"
|
||||
completion: completion attempted on an empty command line.
|
||||
|
||||
g. New complete/compgen/compopt -D option to define a `default' completion:
|
||||
a completion to be invoked on command for which no completion has been
|
||||
defined. If this function returns 124, programmable completion is
|
||||
attempted again, allowing a user to dynamically build a set of completions
|
||||
as completion is attempted by having the default completion function
|
||||
install individual completion functions each time it is invoked.
|
||||
|
||||
h. When displaying associative arrays, subscripts are now quoted.
|
||||
|
||||
i. Changes to dabbrev-expand to make it more `emacs-like': no space appended
|
||||
after matches, completions are not sorted, and most recent history entries
|
||||
are presented first.
|
||||
|
||||
j. The [[ and (( commands are now subject to the setting of `set -e' and the
|
||||
ERR trap.
|
||||
|
||||
k. The source/. builtin now removes NUL bytes from the file before attempting
|
||||
to parse commands.
|
||||
|
||||
l. There is a new configuration option (in config-top.h) that forces bash to
|
||||
forward all history entries to syslog.
|
||||
|
||||
m. A new variable $BASHOPTS to export shell options settable using `shopt' to
|
||||
child processes.
|
||||
|
||||
n. There is a new confgure option that forces the extglob option to be
|
||||
enabled by default.
|
||||
|
||||
o. New variable $BASH_XTRACEFD; when set to an integer bash will write xtrace
|
||||
output to that file descriptor.
|
||||
|
||||
p. If the optional left-hand-side of a redirection is of the form {var}, the
|
||||
shell assigns the file descriptor used to $var or uses $var as the file
|
||||
descriptor to move or close, depending on the redirection operator.
|
||||
|
||||
q. The < and > operators to the [[ conditional command now do string
|
||||
comparison according to the current locale.
|
||||
|
||||
r. Programmable completion now uses the completion for `b' instead of `a'
|
||||
when completion is attempted on a line like: a $(b c.
|
||||
|
||||
s. Force extglob on temporarily when parsing the pattern argument to
|
||||
the == and != operators to the [[ command, for compatibility.
|
||||
|
||||
t. Changed the behavior of interrupting the wait builtin when a SIGCHLD is
|
||||
received and a trap on SIGCHLD is set to be Posix-mode only.
|
||||
|
||||
u. The read builtin has a new `-N nchars' option, which reads exactly NCHARS
|
||||
characters, ignoring delimiters like newline.
|
||||
|
||||
4. New Features in Readline
|
||||
|
||||
a. New bindable function: menu-complete-backward.
|
||||
|
||||
b. In the vi insertion keymap, C-n is now bound to menu-complete by default,
|
||||
and C-p to menu-complete-backward.
|
||||
|
||||
c. When in vi command mode, repeatedly hitting ESC now does nothing, even
|
||||
when ESC introduces a bound key sequence. This is closer to how
|
||||
historical vi behaves.
|
||||
|
||||
d. New bindable function: skip-csi-sequence. Can be used as a default to
|
||||
consume key sequences generated by keys like Home and End without having
|
||||
to bind all keys.
|
||||
|
||||
e. New application-settable function: rl_filename_rewrite_hook. Can be used
|
||||
to rewite or modify filenames read from the file system before they are
|
||||
compared to the word to be completed.
|
||||
|
||||
f. New bindable variable: skip-completed-text, active when completing in the
|
||||
middle of a word. If enabled, it means that characters in the completion
|
||||
that match characters in the remainder of the word are "skipped" rather
|
||||
than inserted into the line.
|
||||
|
||||
g. The pre-readline-6.0 version of menu completion is available as
|
||||
"old-menu-complete" for users who do not like the readline-6.0 version.
|
||||
|
||||
h. New bindable variable: echo-control-characters. If enabled, and the
|
||||
tty ECHOCTL bit is set, controls the echoing of characters corresponding
|
||||
to keyboard-generated signals.
|
||||
|
||||
i. New bindable variable: enable-meta-key. Controls whether or not readline
|
||||
sends the smm/rmm sequences if the terminal indicates it has a meta key
|
||||
that enables eight-bit characters.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
This document details the changes between this version, bash-4.0-release,
|
||||
and the previous version, bash-4.0-rc1.
|
||||
|
||||
|
||||
+6440
File diff suppressed because it is too large
Load Diff
+39
-3
@@ -8071,7 +8071,8 @@ subst.c
|
||||
no positional parameters be a non-fatal error. This is the
|
||||
consensus of the austin group, though it is not historical practice.
|
||||
Message from Geoff Clare <20090505091501.GA10097@squonk.masqnet> of
|
||||
5 May 2009 to austin-group list
|
||||
5 May 2009 and http://austingroupbugs.net/view.php?id=155
|
||||
|
||||
|
||||
5/20
|
||||
----
|
||||
@@ -8587,8 +8588,7 @@ lib/readline/text.c
|
||||
end, and we don't call rl_insert_text if passed the empty string
|
||||
|
||||
config.h.in
|
||||
- add define for HAVE_ICONV, already found by intl autoconf
|
||||
macros
|
||||
- add define for HAVE_ICONV, already found by intl autoconf macros
|
||||
- add define for HAVE_LOCALE_CHARSET
|
||||
|
||||
aclocal.m4
|
||||
@@ -8978,3 +8978,39 @@ jobs.c
|
||||
doc/bashref.texi
|
||||
- document new posix mode behavior about SIGCHLD arriving while the
|
||||
wait builtin is executing when a trap on SIGCHLD has been set
|
||||
|
||||
10/6
|
||||
----
|
||||
lib/readline/histexpand.c
|
||||
- fix hist_expand to keep from stopping history expansion after the
|
||||
first multibyte character (a `break' instead of a `continue').
|
||||
Fixes debian bug (#549933) reported by Nikolaus Schulz
|
||||
<microschulz@web.de>
|
||||
|
||||
10/8
|
||||
----
|
||||
builtins/read.def
|
||||
- implement new `-N nchars' option: read exactly NCHARS characters,
|
||||
ignoring any delimiter, and don't split the result on $IFS.
|
||||
Feature requested by Richard Stallman <rms@gnu.org>
|
||||
|
||||
doc/{bash.1,bashref.texi}
|
||||
- document new `read -N' option
|
||||
|
||||
10/9
|
||||
----
|
||||
lib/readline/bind.c
|
||||
- new bindable variable, "enable-meta-key", controls whether or not
|
||||
readline enables any meta modifier key the terminal claims to
|
||||
support. Suggested by Werner Fink <werner@suse.de>
|
||||
|
||||
lib/readline/doc/{readline.3,rluser.texi},doc/bash.1
|
||||
- document new readline "enable-meta-key" bindable variable
|
||||
|
||||
10/10
|
||||
-----
|
||||
trap.c
|
||||
- new function, free_trap_string(), does what it says and turns off
|
||||
SIG_TRAPPED flag without changing signal disposition
|
||||
|
||||
[bash-4.1-alpha frozen]
|
||||
|
||||
+39
-4
@@ -8071,7 +8071,8 @@ subst.c
|
||||
no positional parameters be a non-fatal error. This is the
|
||||
consensus of the austin group, though it is not historical practice.
|
||||
Message from Geoff Clare <20090505091501.GA10097@squonk.masqnet> of
|
||||
5 May 2009 to austin-group list
|
||||
5 May 2009 and http://austingroupbugs.net/view.php?id=155
|
||||
|
||||
|
||||
5/20
|
||||
----
|
||||
@@ -8587,8 +8588,7 @@ lib/readline/text.c
|
||||
end, and we don't call rl_insert_text if passed the empty string
|
||||
|
||||
config.h.in
|
||||
- add define for HAVE_ICONV, already found by intl autoconf
|
||||
macros
|
||||
- add define for HAVE_ICONV, already found by intl autoconf macros
|
||||
- add define for HAVE_LOCALE_CHARSET
|
||||
|
||||
aclocal.m4
|
||||
@@ -8972,8 +8972,43 @@ jobs.c
|
||||
- change waitchld() to only interrupt the wait builtin when the shell
|
||||
receives SIGCHLD in Posix mode. It's a posix requirement, but
|
||||
makes easy things hard to do, like run a SIGCHLD trap for every
|
||||
exiting child
|
||||
exiting child. Change prompted by question from Alex Efros
|
||||
<powerman@powerman.name>
|
||||
|
||||
doc/bashref.texi
|
||||
- document new posix mode behavior about SIGCHLD arriving while the
|
||||
wait builtin is executing when a trap on SIGCHLD has been set
|
||||
|
||||
10/6
|
||||
----
|
||||
lib/readline/histexpand.c
|
||||
- fix hist_expand to keep from stopping history expansion after the
|
||||
first multibyte character (a `break' instead of a `continue').
|
||||
Fixes debian bug (#549933) reported by Nikolaus Schulz
|
||||
<microschulz@web.de>
|
||||
|
||||
10/8
|
||||
----
|
||||
builtins/read.def
|
||||
- implement new `-N nchars' option: read exactly NCHARS characters,
|
||||
ignoring any delimiter, and don't split the result on $IFS.
|
||||
Feature requested by Richard Stallman <rms@gnu.org>
|
||||
|
||||
doc/{bash.1,bashref.texi}
|
||||
- document new `read -N' option
|
||||
|
||||
10/9
|
||||
----
|
||||
lib/readline/bind.c
|
||||
- new bindable variable, "enable-meta-key", controls whether or not
|
||||
readline enables any meta modifier key the terminal claims to
|
||||
support. Suggested by Werner Fink <werner@suse.de>
|
||||
|
||||
lib/readline/doc/{readline.3,rluser.texi},doc/bash.1
|
||||
- document new readline "enable-meta-key" bindable variable
|
||||
|
||||
10/10
|
||||
-----
|
||||
trap.c
|
||||
- new function, free_trap_string(), does what it says and turns off
|
||||
SIG_TRAPPED flag without changing signal disposition
|
||||
|
||||
+18
-4
@@ -22,7 +22,7 @@ $PRODUCES read.c
|
||||
|
||||
$BUILTIN read
|
||||
$FUNCTION read_builtin
|
||||
$SHORT_DOC read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-p prompt] [-t timeout] [-u fd] [name ...]
|
||||
$SHORT_DOC read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]
|
||||
Read a line from the standard input and split it into fields.
|
||||
|
||||
Reads a single line from the standard input, or from file descriptor FD
|
||||
@@ -42,7 +42,10 @@ Options:
|
||||
-e use Readline to obtain the line in an interactive shell
|
||||
-i text Use TEXT as the initial text for Readline
|
||||
-n nchars return after reading NCHARS characters rather than waiting
|
||||
for a newline
|
||||
for a newline, but honor a delimiter if fewer than NCHARS
|
||||
characters are read before the delimiter
|
||||
-N nchars return only after reading exactly NCHARS characters, unless
|
||||
EOF is encountered or read times out, ignoring any delimiter
|
||||
-p prompt output the string PROMPT without a trailing newline before
|
||||
attempting to read
|
||||
-r do not allow backslashes to escape any characters
|
||||
@@ -155,7 +158,7 @@ read_builtin (list)
|
||||
register char *varname;
|
||||
int size, i, nr, pass_next, saw_escape, eof, opt, retval, code, print_ps2;
|
||||
int input_is_tty, input_is_pipe, unbuffered_read, skip_ctlesc, skip_ctlnul;
|
||||
int raw, edit, nchars, silent, have_timeout, fd;
|
||||
int raw, edit, nchars, silent, have_timeout, ignore_delim, fd;
|
||||
unsigned int tmsec, tmusec;
|
||||
long ival, uval;
|
||||
intmax_t intval;
|
||||
@@ -211,9 +214,10 @@ read_builtin (list)
|
||||
tmsec = tmusec = 0; /* no timeout */
|
||||
nr = nchars = input_is_tty = input_is_pipe = unbuffered_read = have_timeout = 0;
|
||||
delim = '\n'; /* read until newline */
|
||||
ignore_delim = 0;
|
||||
|
||||
reset_internal_getopt ();
|
||||
while ((opt = internal_getopt (list, "ersa:d:i:n:p:t:u:")) != -1)
|
||||
while ((opt = internal_getopt (list, "ersa:d:i:n:p:t:u:N:")) != -1)
|
||||
{
|
||||
switch (opt)
|
||||
{
|
||||
@@ -255,6 +259,9 @@ read_builtin (list)
|
||||
tmusec = uval;
|
||||
}
|
||||
break;
|
||||
case 'N':
|
||||
ignore_delim = 1;
|
||||
delim = -1;
|
||||
case 'n':
|
||||
code = legal_number (list_optarg, &intval);
|
||||
if (code == 0 || intval < 0 || intval != (int)intval)
|
||||
@@ -299,10 +306,17 @@ read_builtin (list)
|
||||
return (input_avail (fd) ? EXECUTION_SUCCESS : EXECUTION_FAILURE);
|
||||
#endif
|
||||
|
||||
/* If we're asked to ignore the delimiter, make sure we do. */
|
||||
if (ignore_delim)
|
||||
delim = -1;
|
||||
|
||||
/* IF IFS is unset, we use the default of " \t\n". */
|
||||
ifs_chars = getifs ();
|
||||
if (ifs_chars == 0) /* XXX - shouldn't happen */
|
||||
ifs_chars = "";
|
||||
/* If we want to read exactly NCHARS chars, don't split on IFS */
|
||||
if (ignore_delim)
|
||||
ifs_chars = "";
|
||||
for (skip_ctlesc = skip_ctlnul = 0, e = ifs_chars; *e; e++)
|
||||
skip_ctlesc |= *e == CTLESC, skip_ctlnul |= *e == CTLNUL;
|
||||
|
||||
|
||||
+18
-7
@@ -5,12 +5,12 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet@po.cwru.edu
|
||||
.\"
|
||||
.\" Last Change: Wed Sep 16 21:33:34 EDT 2009
|
||||
.\" Last Change: Fri Oct 9 12:07:53 EDT 2009
|
||||
.\"
|
||||
.\" bash_builtins, strip all but Built-Ins section
|
||||
.if \n(zZ=1 .ig zZ
|
||||
.if \n(zY=1 .ig zY
|
||||
.TH BASH 1 "2009 September 16" "GNU Bash-4.1"
|
||||
.TH BASH 1 "2009 October 9" "GNU Bash-4.1"
|
||||
.\"
|
||||
.\" There's some problem with having a `@'
|
||||
.\" in a tagged paragraph with the BSD man macros.
|
||||
@@ -1096,8 +1096,8 @@ a control-\fIx\fP character
|
||||
The expanded result is single-quoted, as if the dollar sign had
|
||||
not been present.
|
||||
.PP
|
||||
A double-quoted string preceded by a dollar sign (\fB$\fP) will cause
|
||||
the string to be translated according to the current locale.
|
||||
A double-quoted string preceded by a dollar sign (\fB$\fP\(dq\fIstring\fP\(dq)
|
||||
will cause the string to be translated according to the current locale.
|
||||
If the current locale is \fBC\fP or \fBPOSIX\fP, the dollar sign
|
||||
is ignored.
|
||||
If the string is translated and replaced, the replacement is
|
||||
@@ -2520,7 +2520,7 @@ is followed by a character which is not to be
|
||||
interpreted as part of its name.
|
||||
.PD
|
||||
.PP
|
||||
If the first character of \fIparameter\fP is an exclamation point,
|
||||
If the first character of \fIparameter\fP is an exclamation point (\fB!\fP),
|
||||
a level of variable indirection is introduced.
|
||||
\fBBash\fP uses the value of the variable formed from the rest of
|
||||
\fIparameter\fP as the name of the variable; this variable is then
|
||||
@@ -4969,6 +4969,11 @@ When set to \fBOn\fP, readline will try to enable the application
|
||||
keypad when it is called. Some systems need this to enable the
|
||||
arrow keys.
|
||||
.TP
|
||||
.B enable\-meta\-key (On)
|
||||
When set to \fBOn\fP, readline will try to enable any meta modifier
|
||||
key the terminal claims to support when it is called. On many terminals,
|
||||
the meta key is used to send eight-bit characters.
|
||||
.TP
|
||||
.B expand\-tilde (Off)
|
||||
If set to \fBon\fP, tilde expansion is performed when readline
|
||||
attempts word completion.
|
||||
@@ -7987,7 +7992,7 @@ The return status is 0 unless an error occurs while
|
||||
reading the name of the current directory or an
|
||||
invalid option is supplied.
|
||||
.TP
|
||||
\fBread\fP [\fB\-ers\fP] [\fB\-a\fP \fIaname\fP] [\fB\-d\fP \fIdelim\fP] [\fB\-i\fP \fItext\fP] [\fB\-n\fP \fInchars\fP] [\fB\-p\fP \fIprompt\fP] [\fB\-t\fP \fItimeout\fP] [\fB\-u\fP \fIfd\fP] [\fIname\fP ...]
|
||||
\fBread\fP [\fB\-ers\fP] [\fB\-a\fP \fIaname\fP] [\fB\-d\fP \fIdelim\fP] [\fB\-i\fP \fItext\fP] [\fB\-n\fP \fInchars\fP] [\fB\-N\fP \fInchars\fP] [\fB\-p\fP \fIprompt\fP] [\fB\-t\fP \fItimeout\fP] [\fB\-u\fP \fIfd\fP] [\fIname\fP ...]
|
||||
One line is read from the standard input, or from the file descriptor
|
||||
\fIfd\fP supplied as an argument to the \fB\-u\fP option, and the first word
|
||||
is assigned to the first
|
||||
@@ -8041,7 +8046,13 @@ buffer before editing begins.
|
||||
.TP
|
||||
.B \-n \fInchars\fP
|
||||
\fBread\fP returns after reading \fInchars\fP characters rather than
|
||||
waiting for a complete line of input.
|
||||
waiting for a complete line of input, but honor a delimiter if fewer
|
||||
than \fInchars\fP characters are read before the delimiter.
|
||||
.TP
|
||||
.B \-N \fInchars\fP
|
||||
\fBread\fP returns after reading exactly \fInchars\fP characters rather
|
||||
than waiting for a complete line of input, unless EOF is encountered or
|
||||
\fBread\fP times out. Any delimiter is ignored.
|
||||
.TP
|
||||
.B \-p \fIprompt\fP
|
||||
Display \fIprompt\fP on standard error, without a
|
||||
|
||||
+13
-7
@@ -5,12 +5,12 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet@po.cwru.edu
|
||||
.\"
|
||||
.\" Last Change: Wed Sep 16 21:33:34 EDT 2009
|
||||
.\" Last Change: Fri Oct 9 12:07:53 EDT 2009
|
||||
.\"
|
||||
.\" bash_builtins, strip all but Built-Ins section
|
||||
.if \n(zZ=1 .ig zZ
|
||||
.if \n(zY=1 .ig zY
|
||||
.TH BASH 1 "2009 September 16" "GNU Bash-4.1"
|
||||
.TH BASH 1 "2009 October 9" "GNU Bash-4.1"
|
||||
.\"
|
||||
.\" There's some problem with having a `@'
|
||||
.\" in a tagged paragraph with the BSD man macros.
|
||||
@@ -1096,8 +1096,8 @@ a control-\fIx\fP character
|
||||
The expanded result is single-quoted, as if the dollar sign had
|
||||
not been present.
|
||||
.PP
|
||||
A double-quoted string preceded by a dollar sign (\fB$\fP) will cause
|
||||
the string to be translated according to the current locale.
|
||||
A double-quoted string preceded by a dollar sign (\fB$\fP\(dq\fIstring\fP\(dq)
|
||||
will cause the string to be translated according to the current locale.
|
||||
If the current locale is \fBC\fP or \fBPOSIX\fP, the dollar sign
|
||||
is ignored.
|
||||
If the string is translated and replaced, the replacement is
|
||||
@@ -2520,7 +2520,7 @@ is followed by a character which is not to be
|
||||
interpreted as part of its name.
|
||||
.PD
|
||||
.PP
|
||||
If the first character of \fIparameter\fP is an exclamation point,
|
||||
If the first character of \fIparameter\fP is an exclamation point (\fB!\fP),
|
||||
a level of variable indirection is introduced.
|
||||
\fBBash\fP uses the value of the variable formed from the rest of
|
||||
\fIparameter\fP as the name of the variable; this variable is then
|
||||
@@ -7987,7 +7987,7 @@ The return status is 0 unless an error occurs while
|
||||
reading the name of the current directory or an
|
||||
invalid option is supplied.
|
||||
.TP
|
||||
\fBread\fP [\fB\-ers\fP] [\fB\-a\fP \fIaname\fP] [\fB\-d\fP \fIdelim\fP] [\fB\-i\fP \fItext\fP] [\fB\-n\fP \fInchars\fP] [\fB\-p\fP \fIprompt\fP] [\fB\-t\fP \fItimeout\fP] [\fB\-u\fP \fIfd\fP] [\fIname\fP ...]
|
||||
\fBread\fP [\fB\-ers\fP] [\fB\-a\fP \fIaname\fP] [\fB\-d\fP \fIdelim\fP] [\fB\-i\fP \fItext\fP] [\fB\-n\fP \fInchars\fP] [\fB\-N\fP \fInchars\fP] [\fB\-p\fP \fIprompt\fP] [\fB\-t\fP \fItimeout\fP] [\fB\-u\fP \fIfd\fP] [\fIname\fP ...]
|
||||
One line is read from the standard input, or from the file descriptor
|
||||
\fIfd\fP supplied as an argument to the \fB\-u\fP option, and the first word
|
||||
is assigned to the first
|
||||
@@ -8041,7 +8041,13 @@ buffer before editing begins.
|
||||
.TP
|
||||
.B \-n \fInchars\fP
|
||||
\fBread\fP returns after reading \fInchars\fP characters rather than
|
||||
waiting for a complete line of input.
|
||||
waiting for a complete line of input, but honor a delimiter if fewer
|
||||
than \fInchars\fP characters are read before the delimiter.
|
||||
.TP
|
||||
.B \-N \fInchars\fP
|
||||
\fBread\fP returns after reading exactly \fInchars\fP characters rather
|
||||
than waiting for a complete line of input, unless EOF is encountered or
|
||||
\fBread\fP times out. Any delimiter is ignored.
|
||||
.TP
|
||||
.B \-p \fIprompt\fP
|
||||
Display \fIprompt\fP on standard error, without a
|
||||
|
||||
+9
-3
@@ -1608,7 +1608,7 @@ or when @var{parameter}
|
||||
is followed by a character that is not to be
|
||||
interpreted as part of its name.
|
||||
|
||||
If the first character of @var{parameter} is an exclamation point,
|
||||
If the first character of @var{parameter} is an exclamation point (!),
|
||||
a level of variable indirection is introduced.
|
||||
Bash uses the value of the variable formed from the rest of
|
||||
@var{parameter} as the name of the variable; this variable is then
|
||||
@@ -3719,7 +3719,7 @@ non-zero on failure.
|
||||
@item read
|
||||
@btindex read
|
||||
@example
|
||||
read [-ers] [-a @var{aname}] [-d @var{delim}] [-i @var{text}] [-n @var{nchars}] [-p @var{prompt}] [-t @var{timeout}] [-u @var{fd}] [@var{name} @dots{}]
|
||||
read [-ers] [-a @var{aname}] [-d @var{delim}] [-i @var{text}] [-n @var{nchars}] [-N @var{nchars}] [-p @var{prompt}] [-t @var{timeout}] [-u @var{fd}] [@var{name} @dots{}]
|
||||
@end example
|
||||
One line is read from the standard input, or from the file descriptor
|
||||
@var{fd} supplied as an argument to the @option{-u} option, and the first word
|
||||
@@ -3762,7 +3762,13 @@ the editing buffer before editing begins.
|
||||
|
||||
@item -n @var{nchars}
|
||||
@code{read} returns after reading @var{nchars} characters rather than
|
||||
waiting for a complete line of input.
|
||||
waiting for a complete line of input, but honor a delimiter if fewer
|
||||
than @var{nchars} characters are read before the delimiter.
|
||||
|
||||
@item -N @var{nchars}
|
||||
@code{read} returns after reading exactly @var{nchars} characters rather
|
||||
than waiting for a complete line of input, unless EOF is encountered or
|
||||
@code{read} times out. Any delimiter is ignored.
|
||||
|
||||
@item -p @var{prompt}
|
||||
Display @var{prompt}, without a trailing newline, before attempting
|
||||
|
||||
+2
-1
@@ -1608,7 +1608,7 @@ or when @var{parameter}
|
||||
is followed by a character that is not to be
|
||||
interpreted as part of its name.
|
||||
|
||||
If the first character of @var{parameter} is an exclamation point,
|
||||
If the first character of @var{parameter} is an exclamation point (!),
|
||||
a level of variable indirection is introduced.
|
||||
Bash uses the value of the variable formed from the rest of
|
||||
@var{parameter} as the name of the variable; this variable is then
|
||||
@@ -6565,6 +6565,7 @@ and @option{-f} options.
|
||||
@item
|
||||
The arrival of @code{SIGCHLD} when a trap is set on @code{SIGCHLD} does
|
||||
not interrupt the @code{wait} builtin and cause it to return immediately.
|
||||
The trap command is run once for each child that exits.
|
||||
|
||||
@end enumerate
|
||||
|
||||
|
||||
+3
-3
@@ -2,9 +2,9 @@
|
||||
Copyright (C) 1988-2009 Free Software Foundation, Inc.
|
||||
@end ignore
|
||||
|
||||
@set LASTCHANGE Wed Sep 16 21:33:56 EDT 2009
|
||||
@set LASTCHANGE Fri Oct 9 12:07:41 EDT 2009
|
||||
|
||||
@set EDITION 4.1
|
||||
@set VERSION 4.1
|
||||
@set UPDATED 16 September 2009
|
||||
@set UPDATED-MONTH September 2009
|
||||
@set UPDATED 9 October 2009
|
||||
@set UPDATED-MONTH October 2009
|
||||
|
||||
+5
-5
@@ -2,9 +2,9 @@
|
||||
Copyright (C) 1988-2009 Free Software Foundation, Inc.
|
||||
@end ignore
|
||||
|
||||
@set LASTCHANGE Wed Jun 17 08:50:54 EDT 2009
|
||||
@set LASTCHANGE Wed Sep 16 21:33:56 EDT 2009
|
||||
|
||||
@set EDITION 4.0
|
||||
@set VERSION 4.0
|
||||
@set UPDATED 17 June 2009
|
||||
@set UPDATED-MONTH June 2009
|
||||
@set EDITION 4.1
|
||||
@set VERSION 4.1
|
||||
@set UPDATED 16 September 2009
|
||||
@set UPDATED-MONTH September 2009
|
||||
|
||||
@@ -1428,6 +1428,7 @@ static const struct {
|
||||
{ "disable-completion", &rl_inhibit_completion, 0 },
|
||||
{ "echo-control-characters", &_rl_echo_control_chars, 0 },
|
||||
{ "enable-keypad", &_rl_enable_keypad, 0 },
|
||||
{ "enable-meta-key", &_rl_enable_meta, 0 },
|
||||
{ "expand-tilde", &rl_complete_with_tilde_expansion, 0 },
|
||||
{ "history-preserve-point", &_rl_history_preserve_point, 0 },
|
||||
{ "horizontal-scroll-mode", &_rl_horizontal_scroll_mode, 0 },
|
||||
|
||||
@@ -1426,7 +1426,9 @@ static const struct {
|
||||
{ "completion-ignore-case", &_rl_completion_case_fold, 0 },
|
||||
{ "convert-meta", &_rl_convert_meta_chars_to_ascii, 0 },
|
||||
{ "disable-completion", &rl_inhibit_completion, 0 },
|
||||
{ "echo-control-characters", &_rl_echo_control_chars, 0 },
|
||||
{ "enable-keypad", &_rl_enable_keypad, 0 },
|
||||
{ "enable-meta-key", &_rl_enable_meta_key, 0 },
|
||||
{ "expand-tilde", &rl_complete_with_tilde_expansion, 0 },
|
||||
{ "history-preserve-point", &_rl_history_preserve_point, 0 },
|
||||
{ "horizontal-scroll-mode", &_rl_horizontal_scroll_mode, 0 },
|
||||
@@ -1443,6 +1445,7 @@ static const struct {
|
||||
{ "revert-all-at-newline", &_rl_revert_all_at_newline, 0 },
|
||||
{ "show-all-if-ambiguous", &_rl_complete_show_all, 0 },
|
||||
{ "show-all-if-unmodified", &_rl_complete_show_unmodified, 0 },
|
||||
{ "skip-completed-text", &_rl_skip_completed_text, 0 },
|
||||
#if defined (VISIBLE_STATS)
|
||||
{ "visible-stats", &rl_visible_stats, 0 },
|
||||
#endif /* VISIBLE_STATS */
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet@ins.CWRU.Edu
|
||||
.\"
|
||||
.\" Last Change: Sat Aug 22 12:03:05 EDT 2009
|
||||
.\" Last Change: Fri Oct 9 12:57:27 EDT 2009
|
||||
.\"
|
||||
.TH READLINE 3 "2009 August 22" "GNU Readline 6.0"
|
||||
.TH READLINE 3 "2009 October 9" "GNU Readline 6.1"
|
||||
.\"
|
||||
.\" File Name macro. This used to be `.PN', for Path Name,
|
||||
.\" but Sun doesn't seem to like that very much.
|
||||
@@ -411,6 +411,11 @@ When set to \fBOn\fP, readline will try to enable the application
|
||||
keypad when it is called. Some systems need this to enable the
|
||||
arrow keys.
|
||||
.TP
|
||||
.B enable\-meta\-key (On)
|
||||
When set to \fBOn\fP, readline will try to enable any meta modifier
|
||||
key the terminal claims to support when it is called. On many terminals,
|
||||
the meta key is used to send eight-bit characters.
|
||||
.TP
|
||||
.B expand\-tilde (Off)
|
||||
If set to \fBon\fP, tilde expansion is performed when readline
|
||||
attempts word completion.
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet@ins.CWRU.Edu
|
||||
.\"
|
||||
.\" Last Change: Thu Jul 30 09:22:50 EDT 2009
|
||||
.\" Last Change: Sat Aug 22 12:03:05 EDT 2009
|
||||
.\"
|
||||
.TH READLINE 3 "2009 Jul 30" "GNU Readline 6.0"
|
||||
.TH READLINE 3 "2009 August 22" "GNU Readline 6.0"
|
||||
.\"
|
||||
.\" File Name macro. This used to be `.PN', for Path Name,
|
||||
.\" but Sun doesn't seem to like that very much.
|
||||
@@ -401,6 +401,11 @@ can be set to either
|
||||
or
|
||||
.BR vi .
|
||||
.TP
|
||||
.B echo\-control\-characters (On)
|
||||
When set to \fBOn\fP, on operating systems that indicate they support it,
|
||||
readline echoes a character corresponding to a signal generated from the
|
||||
keyboard.
|
||||
.TP
|
||||
.B enable\-keypad (Off)
|
||||
When set to \fBOn\fP, readline will try to enable the application
|
||||
keypad when it is called. Some systems need this to enable the
|
||||
@@ -504,6 +509,14 @@ possible partial completion (the possible completions don't share
|
||||
a common prefix) cause the matches to be listed immediately instead
|
||||
of ringing the bell.
|
||||
.TP
|
||||
.B skip\-completed\-text (Off)
|
||||
If set to \fBOn\fP, this alters the default completion behavior when
|
||||
inserting a single match into the line. It's only active when
|
||||
performing completion in the middle of a word. If enabled, readline
|
||||
does not insert characters from the completion that match characters
|
||||
after point in the word being completed, so portions of the word
|
||||
following the cursor are not duplicated.
|
||||
.TP
|
||||
.B visible\-stats (Off)
|
||||
If set to \fBOn\fP, a character denoting a file's type as reported
|
||||
by \fIstat\fP(2) is appended to the filename when listing possible
|
||||
|
||||
@@ -485,6 +485,12 @@ When set to @samp{on}, Readline will try to enable the application
|
||||
keypad when it is called. Some systems need this to enable the
|
||||
arrow keys. The default is @samp{off}.
|
||||
|
||||
@item enable-meta-key
|
||||
When set to @samp{on}, Readline will try to enable any meta modifier
|
||||
key the terminal claims to support when it is called. On many terminals,
|
||||
the meta key is used to send eight-bit characters.
|
||||
The default is @samp{on}.
|
||||
|
||||
@item expand-tilde
|
||||
@vindex expand-tilde
|
||||
If set to @samp{on}, tilde expansion is performed when Readline
|
||||
|
||||
@@ -474,6 +474,11 @@ key bindings is used. By default, Readline starts up in Emacs editing
|
||||
mode, where the keystrokes are most similar to Emacs. This variable can be
|
||||
set to either @samp{emacs} or @samp{vi}.
|
||||
|
||||
@item echo-control-characters
|
||||
When set to @samp{on}, on operating systems that indicate they support it,
|
||||
readline echoes a character corresponding to a signal generated from the
|
||||
keyboard. The default is @samp{on}.
|
||||
|
||||
@item enable-keypad
|
||||
@vindex enable-keypad
|
||||
When set to @samp{on}, Readline will try to enable the application
|
||||
@@ -606,6 +611,20 @@ a common prefix) cause the matches to be listed immediately instead
|
||||
of ringing the bell.
|
||||
The default value is @samp{off}.
|
||||
|
||||
@item skip-completed-text
|
||||
@vindex skip-completed-text
|
||||
If set to @samp{on}, this alters the default completion behavior when
|
||||
inserting a single match into the line. It's only active when
|
||||
performing completion in the middle of a word. If enabled, readline
|
||||
does not insert characters from the completion that match characters
|
||||
after point in the word being completed, so portions of the word
|
||||
following the cursor are not duplicated.
|
||||
For instance, if this is enabled, attempting completion when the cursor
|
||||
is after the @samp{e} in @samp{Makefile} will result in @samp{Makefile}
|
||||
rather than @samp{Makefilefile}, assuming there is a single possible
|
||||
completion.
|
||||
The default value is @samp{off}.
|
||||
|
||||
@item visible-stats
|
||||
@vindex visible-stats
|
||||
If set to @samp{on}, a character denoting a file's type
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
Copyright (C) 1988-2009 Free Software Foundation, Inc.
|
||||
@end ignore
|
||||
|
||||
@set EDITION 6.0
|
||||
@set VERSION 6.0
|
||||
@set UPDATED 31 August 2009
|
||||
@set UPDATED-MONTH August 2009
|
||||
@set EDITION 6.1
|
||||
@set VERSION 6.1
|
||||
@set UPDATED 9 October 2009
|
||||
@set UPDATED-MONTH October 2009
|
||||
|
||||
@set LASTCHANGE Mon Aug 31 09:01:30 EDT 2009
|
||||
@set LASTCHANGE Fri Oct 9 12:57:58 EDT 2009
|
||||
|
||||
@@ -4,7 +4,7 @@ Copyright (C) 1988-2009 Free Software Foundation, Inc.
|
||||
|
||||
@set EDITION 6.0
|
||||
@set VERSION 6.0
|
||||
@set UPDATED 22 August 2009
|
||||
@set UPDATED 31 August 2009
|
||||
@set UPDATED-MONTH August 2009
|
||||
|
||||
@set LASTCHANGE Sat Aug 22 12:02:34 EDT 2009
|
||||
@set LASTCHANGE Mon Aug 31 09:01:30 EDT 2009
|
||||
|
||||
@@ -1101,7 +1101,7 @@ history_expand (hstring, output)
|
||||
if (strlen (mb) > 1)
|
||||
{
|
||||
ADD_STRING (mb);
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
#endif /* HANDLE_MULTIBYTE */
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
*** ../bash-4.0-patched/lib/readline/complete.c 2009-01-22 15:15:14.000000000 -0500
|
||||
--- lib/readline/complete.c 2009-08-26 17:15:59.000000000 -0400
|
||||
***************
|
||||
*** 2209,2213 ****
|
||||
/* The first time through, we generate the list of matches and set things
|
||||
up to insert them. */
|
||||
! if (rl_last_func != rl_menu_complete)
|
||||
{
|
||||
/* Clean up from previous call, if any. */
|
||||
--- 2252,2256 ----
|
||||
/* The first time through, we generate the list of matches and set things
|
||||
up to insert them. */
|
||||
! if (rl_last_func != rl_old_menu_complete)
|
||||
{
|
||||
/* Clean up from previous call, if any. */
|
||||
***************
|
||||
*** 2221,2224 ****
|
||||
--- 2264,2269 ----
|
||||
rl_completion_invoking_key = invoking_key;
|
||||
|
||||
+ RL_SETSTATE(RL_STATE_COMPLETING);
|
||||
+
|
||||
/* Only the completion entry function can change these. */
|
||||
set_completion_defaults ('%');
|
||||
***************
|
||||
*** 2260,2266 ****
|
||||
--- 2305,2314 ----
|
||||
orig_text = (char *)0;
|
||||
completion_changed_buffer = 0;
|
||||
+ RL_UNSETSTATE(RL_STATE_COMPLETING);
|
||||
return (0);
|
||||
}
|
||||
|
||||
+ RL_UNSETSTATE(RL_STATE_COMPLETING);
|
||||
+
|
||||
for (match_list_size = 0; matches[match_list_size]; match_list_size++)
|
||||
;
|
||||
***************
|
||||
*** 2338,2341 ****
|
||||
--- 2386,2391 ----
|
||||
full_completion = 0;
|
||||
|
||||
+ RL_SETSTATE(RL_STATE_COMPLETING);
|
||||
+
|
||||
/* Only the completion entry function can change these. */
|
||||
set_completion_defaults ('%');
|
||||
***************
|
||||
*** 2379,2385 ****
|
||||
--- 2429,2438 ----
|
||||
orig_text = (char *)0;
|
||||
completion_changed_buffer = 0;
|
||||
+ RL_UNSETSTATE(RL_STATE_COMPLETING);
|
||||
return (0);
|
||||
}
|
||||
|
||||
+ RL_UNSETSTATE(RL_STATE_COMPLETING);
|
||||
+
|
||||
for (match_list_size = 0; matches[match_list_size]; match_list_size++)
|
||||
;
|
||||
@@ -5,6 +5,7 @@ arrayfunc.c
|
||||
bashhist.c
|
||||
bashline.c
|
||||
braces.c
|
||||
builtins/alias.def
|
||||
builtins/bind.def
|
||||
builtins/break.def
|
||||
builtins/caller.def
|
||||
@@ -48,12 +49,14 @@ expr.c
|
||||
general.c
|
||||
input.c
|
||||
jobs.c
|
||||
lib/intl/os2compat.c
|
||||
lib/malloc/malloc.c
|
||||
lib/malloc/stats.c
|
||||
lib/malloc/table.c
|
||||
lib/malloc/watch.c
|
||||
lib/sh/fmtulong.c
|
||||
lib/sh/netopen.c
|
||||
locale.c
|
||||
mailcheck.c
|
||||
make_cmd.c
|
||||
nojobs.c
|
||||
@@ -70,6 +73,7 @@ test.c
|
||||
trap.c
|
||||
variables.c
|
||||
version.c
|
||||
version2.c
|
||||
xmalloc.c
|
||||
|
||||
# Apparently gettext's defaults cannot handle files that exist outside of the
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
# List of source files containing translatable strings.
|
||||
# Copyright (C) 2004 Free Software Foundation, Inc.
|
||||
|
||||
arrayfunc.c
|
||||
bashhist.c
|
||||
bashline.c
|
||||
braces.c
|
||||
builtins/bind.def
|
||||
builtins/break.def
|
||||
builtins/caller.def
|
||||
builtins/cd.def
|
||||
builtins/common.c
|
||||
builtins/complete.def
|
||||
builtins/declare.def
|
||||
builtins/enable.def
|
||||
builtins/evalfile.c
|
||||
builtins/exec.def
|
||||
builtins/exit.def
|
||||
builtins/fc.def
|
||||
builtins/fg_bg.def
|
||||
builtins/getopt.c
|
||||
builtins/hash.def
|
||||
builtins/help.def
|
||||
builtins/history.def
|
||||
builtins/inlib.def
|
||||
builtins/jobs.def
|
||||
builtins/kill.def
|
||||
builtins/let.def
|
||||
builtins/mapfile.def
|
||||
builtins/mkbuiltins.c
|
||||
builtins/printf.def
|
||||
builtins/pushd.def
|
||||
builtins/read.def
|
||||
builtins/return.def
|
||||
builtins/set.def
|
||||
builtins/setattr.def
|
||||
builtins/shift.def
|
||||
builtins/shopt.def
|
||||
builtins/source.def
|
||||
builtins/suspend.def
|
||||
builtins/type.def
|
||||
builtins/ulimit.def
|
||||
builtins/umask.def
|
||||
error.c
|
||||
eval.c
|
||||
execute_cmd.c
|
||||
expr.c
|
||||
general.c
|
||||
input.c
|
||||
jobs.c
|
||||
lib/malloc/malloc.c
|
||||
lib/malloc/stats.c
|
||||
lib/malloc/table.c
|
||||
lib/malloc/watch.c
|
||||
lib/sh/fmtulong.c
|
||||
lib/sh/netopen.c
|
||||
mailcheck.c
|
||||
make_cmd.c
|
||||
nojobs.c
|
||||
parse.y
|
||||
pcomplete.c
|
||||
pcomplib.c
|
||||
print_cmd.c
|
||||
redir.c
|
||||
shell.c
|
||||
sig.c
|
||||
siglist.c
|
||||
subst.c
|
||||
test.c
|
||||
trap.c
|
||||
variables.c
|
||||
version.c
|
||||
xmalloc.c
|
||||
|
||||
# Apparently gettext's defaults cannot handle files that exist outside of the
|
||||
# source directory, like in the build directory
|
||||
#../builtins/builtins.c
|
||||
+350
-288
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+373
-298
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+373
-298
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+358
-285
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+346
-284
File diff suppressed because it is too large
Load Diff
@@ -52,7 +52,7 @@ write_signames (stream)
|
||||
|
||||
fprintf (stream, "/* This file was automatically created by %s.\n",
|
||||
progname);
|
||||
fprintf (stream, " Do not edit. Edit support/signames.c instead. */\n\n");
|
||||
fprintf (stream, " Do not edit. Edit support/mksignames.c instead. */\n\n");
|
||||
fprintf (stream,
|
||||
"/* A translation list so we can be polite to our users. */\n");
|
||||
#if defined (CROSS_COMPILING)
|
||||
|
||||
@@ -72,6 +72,7 @@ static void get_original_signal __P((int));
|
||||
|
||||
static int _run_trap_internal __P((int, char *));
|
||||
|
||||
static void free_trap_string __P((int));
|
||||
static void reset_signal __P((int));
|
||||
static void restore_signal __P((int));
|
||||
static void reset_or_restore_signal_handlers __P((sh_resetsig_func_t *));
|
||||
@@ -889,20 +890,28 @@ run_interrupt_trap ()
|
||||
|
||||
#ifdef INCLUDE_UNUSED
|
||||
/* Free all the allocated strings in the list of traps and reset the trap
|
||||
values to the default. */
|
||||
values to the default. Intended to be called from subshells that want
|
||||
to complete work done by reset_signal_handlers upon execution of a
|
||||
subsequent `trap' command that changes a signal's disposition. */
|
||||
void
|
||||
free_trap_strings ()
|
||||
{
|
||||
register int i;
|
||||
|
||||
for (i = 0; i < BASH_NSIG; i++)
|
||||
{
|
||||
free_trap_command (i);
|
||||
trap_list[i] = (char *)DEFAULT_SIG;
|
||||
sigmodes[i] &= ~SIG_TRAPPED;
|
||||
}
|
||||
free_trap_string (i);
|
||||
trap_list[DEBUG_TRAP] = trap_list[EXIT_TRAP] = trap_list[ERROR_TRAP] = trap_list[RETURN_TRAP] = (char *)NULL;
|
||||
}
|
||||
|
||||
/* Free a trap command string associated with SIG without changing signal
|
||||
disposition. Intended to be called from free_trap_strings() */
|
||||
static void
|
||||
free_trap_string (sig)
|
||||
int sig;
|
||||
{
|
||||
change_signal (sig, (char *)DEFAULT_SIG);
|
||||
sigmodes[sig] &= ~SIG_TRAPPED;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Reset the handler for SIG to the original value. */
|
||||
|
||||
@@ -72,6 +72,7 @@ static void get_original_signal __P((int));
|
||||
|
||||
static int _run_trap_internal __P((int, char *));
|
||||
|
||||
static void free_trap_string __P((int));
|
||||
static void reset_signal __P((int));
|
||||
static void restore_signal __P((int));
|
||||
static void reset_or_restore_signal_handlers __P((sh_resetsig_func_t *));
|
||||
@@ -334,13 +335,14 @@ run_pending_traps ()
|
||||
else
|
||||
{
|
||||
token_state = save_token_state ();
|
||||
save_subst_varlist = subst_assign_varlist;
|
||||
subst_assign_varlist = 0;
|
||||
itrace("run_pending_traps: subst_assign_varlist = NULL");
|
||||
save_subst_varlist = subst_assign_varlist;
|
||||
subst_assign_varlist = 0;
|
||||
|
||||
parse_and_execute (savestring (trap_list[sig]), "trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE);
|
||||
restore_token_state (token_state);
|
||||
free (token_state);
|
||||
subst_assign_varlist = save_subst_varlist;
|
||||
|
||||
subst_assign_varlist = save_subst_varlist;
|
||||
}
|
||||
|
||||
pending_traps[sig] = 0;
|
||||
@@ -734,6 +736,7 @@ _run_trap_internal (sig, tag)
|
||||
int trap_exit_value, *token_state;
|
||||
int save_return_catch_flag, function_code, flags;
|
||||
procenv_t save_return_catch;
|
||||
WORD_LIST *save_subst_varlist;
|
||||
|
||||
trap_exit_value = function_code = 0;
|
||||
/* Run the trap only if SIG is trapped and not ignored, and we are not
|
||||
@@ -751,6 +754,8 @@ _run_trap_internal (sig, tag)
|
||||
trap_saved_exit_value = last_command_exit_value;
|
||||
|
||||
token_state = save_token_state ();
|
||||
save_subst_varlist = subst_assign_varlist;
|
||||
subst_assign_varlist = 0;
|
||||
|
||||
/* If we're in a function, make sure return longjmps come here, too. */
|
||||
save_return_catch_flag = return_catch_flag;
|
||||
@@ -769,6 +774,8 @@ _run_trap_internal (sig, tag)
|
||||
restore_token_state (token_state);
|
||||
free (token_state);
|
||||
|
||||
subst_assign_varlist = save_subst_varlist;
|
||||
|
||||
trap_exit_value = last_command_exit_value;
|
||||
last_command_exit_value = trap_saved_exit_value;
|
||||
running_trap = 0;
|
||||
@@ -890,13 +897,19 @@ free_trap_strings ()
|
||||
register int i;
|
||||
|
||||
for (i = 0; i < BASH_NSIG; i++)
|
||||
{
|
||||
free_trap_command (i);
|
||||
trap_list[i] = (char *)DEFAULT_SIG;
|
||||
sigmodes[i] &= ~SIG_TRAPPED;
|
||||
}
|
||||
free_trap_string (i);
|
||||
trap_list[DEBUG_TRAP] = trap_list[EXIT_TRAP] = trap_list[ERROR_TRAP] = trap_list[RETURN_TRAP] = (char *)NULL;
|
||||
}
|
||||
|
||||
/* Free a trap command string associated with SIG without changing signal
|
||||
disposition. */
|
||||
static void
|
||||
free_trap_string (sig)
|
||||
int sig;
|
||||
{
|
||||
change_signal (sig, (char *)DEFAULT_SIG);
|
||||
sigmodes[sig] &= ~SIG_TRAPPED;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Reset the handler for SIG to the original value. */
|
||||
|
||||
Reference in New Issue
Block a user