commit bash-20191011 snapshot

This commit is contained in:
Chet Ramey
2019-11-01 15:26:59 -04:00
parent aa99ef520f
commit f48a489585
12 changed files with 5090 additions and 1494 deletions
+21
View File
@@ -6782,3 +6782,24 @@ lib/sh/shmatch.c
<grishalevit@gmail.com> and don't allow nocaseglob to enable case-
insensitive regexp matching. It hasn't been documented that way
in years
10/30
-----
bashhist.c
- bash_add_history: fix a couple of problems with adding extra blank
lines to history entries containing here-documents. Fixes bug
reported by Oguz <oguzismailuysal@gmail.com>
lib/sh/shmatch.c
- BASH_REMATCH: no longer set to readonly. From a suggestion from
Rocky Bernstein <rocky@gnu.org>
doc/{bash.1,bashref.texi}
- BASH_REMATCH: document that it's no longer set to readonly
subst.c
- getpattern: since expand_string_for_pat leaves the pattern quoted,
we need to remove quoted nulls before running the string through
string_list (and then quote_string_for_globbing, since QGLOB_CVTNULL
only handles pat[0] == CTLNUL). Fixes bug reported by Oguz
<oguzismailuysal@gmail.com>
+2
View File
@@ -565,6 +565,8 @@ po/it.gmo f
po/it.po f
po/ja.gmo f
po/ja.po f
po/ko.gmo f
po/ko.po f
po/lt.gmo f
po/lt.po f
po/nl.gmo f
+9 -3
View File
@@ -850,13 +850,15 @@ void
bash_add_history (line)
char *line;
{
int add_it, offset, curlen;
int add_it, offset, curlen, is_comment;
HIST_ENTRY *current, *old;
char *chars_to_add, *new_line;
add_it = 1;
if (command_oriented_history && current_command_line_count > 1)
{
is_comment = shell_comment (line);
/* The second and subsequent lines of a here document have the trailing
newline preserved. We don't want to add extra newlines here, but we
do want to add one after the first line (which is the command that
@@ -864,7 +866,11 @@ bash_add_history (line)
does the right thing to take care of this for us. We don't want to
add extra newlines if the user chooses to enable literal_history,
so we have to duplicate some of what that function does here. */
if ((parser_state & PST_HEREDOC) && literal_history && current_command_line_count > 2 && line[strlen (line) - 1] == '\n')
/* If we're in a here document and past the first line,
(current_command_line_count > 2)
don't add a newline here. This will also take care of the literal_history
case if the other conditions are met. */
if ((parser_state & PST_HEREDOC) && current_command_line_count > 2 && line[strlen (line) - 1] == '\n')
chars_to_add = "";
else if (current_command_line_count == current_command_line_comment+1)
chars_to_add = "\n";
@@ -876,7 +882,7 @@ bash_add_history (line)
using_history ();
current = previous_history ();
current_command_line_comment = shell_comment (line) ? current_command_line_count : -2;
current_command_line_comment = is_comment ? current_command_line_count : -2;
if (current)
{
+2 -3
View File
@@ -5,12 +5,12 @@
.\" Case Western Reserve University
.\" chet.ramey@case.edu
.\"
.\" Last Change: Wed Sep 25 16:28:22 EDT 2019
.\" Last Change: Wed Oct 30 16:58:09 EDT 2019
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
.TH BASH 1 "2019 September 25" "GNU Bash 5.0"
.TH BASH 1 "2019 October 30" "GNU Bash 5.0"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@@ -1611,7 +1611,6 @@ The element with index 0 is the portion of the string
matching the entire regular expression.
The element with index \fIn\fP is the portion of the
string matching the \fIn\fPth parenthesized subexpression.
This variable is read-only.
.TP
.B BASH_SOURCE
An array variable whose members are the source filenames
-1
View File
@@ -5786,7 +5786,6 @@ The element with index 0 is the portion of the string
matching the entire regular expression.
The element with index @var{n} is the portion of the
string matching the @var{n}th parenthesized subexpression.
This variable is read-only.
@item BASH_SOURCE
An array variable whose members are the source filenames where the
+3 -3
View File
@@ -2,10 +2,10 @@
Copyright (C) 1988-2019 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Wed Sep 25 16:27:43 EDT 2019
@set LASTCHANGE Wed Oct 30 16:57:22 EDT 2019
@set EDITION 5.0
@set VERSION 5.0
@set UPDATED 25 September 2019
@set UPDATED-MONTH September 2019
@set UPDATED 30 October 2019
@set UPDATED-MONTH October 2019
+2
View File
@@ -107,7 +107,9 @@ sh_regmatch (string, pattern, flags)
}
}
#if 0
VSETATTR (rematch, att_readonly);
#endif
free (subexp_str);
free (matches);
+1 -1
View File
@@ -1,2 +1,2 @@
# Set of available languages.
en@quot en@boldquot af bg ca cs da de el eo es et fi fr ga gl hr hu id it ja lt nb nl pl pt pt_BR ro ru sk sl sr sv tr uk vi zh_CN zh_TW
en@quot en@boldquot af bg ca cs da de el eo es et fi fr ga gl hr hu id it ja ko lt nb nl pl pt pt_BR ro ru sk sl sr sv tr uk vi zh_CN zh_TW
+357 -735
View File
File diff suppressed because it is too large Load Diff
+601 -748
View File
File diff suppressed because it is too large Load Diff
+4090
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -5164,6 +5164,8 @@ getpattern (value, quoted, expandpat)
(quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) ? Q_PATQUOTE : quoted,
(int *)NULL, (int *)NULL)
: (WORD_LIST *)0;
if (l)
word_list_remove_quoted_nulls (l);
pat = string_list (l);
dispose_words (l);
if (pat)