mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-27 15:43:18 +02:00
commit bash-20200630 snapshot
This commit is contained in:
@@ -8629,3 +8629,36 @@ unwind_prot.c
|
||||
- unwind_protect_mem_internal: make sure we allocate at least as many
|
||||
bytes for an entire UNWIND_ELT. Fix from Jessica Clarke
|
||||
<jrtc27@jrtc27.com>
|
||||
|
||||
7/1
|
||||
---
|
||||
eval.c
|
||||
- alrm_catcher: use write(2) instead of fprintf to print the
|
||||
auto-logout message to the terminal
|
||||
|
||||
jobs.c
|
||||
- UNQUEUE_SIGCHLD: set queue_sigchld to 1 around call to waitchld(),
|
||||
since it is not being called from a signal handler and so SIGCHLD is
|
||||
not blocked. Fixes report by Godmar Back <godmar@gmail.com>
|
||||
|
||||
7/2
|
||||
---
|
||||
doc/{bash.1,bashref.texi}
|
||||
- read: clarify that without any name arguments, the line assigned to
|
||||
REPLY is not modified. From a question by M. Nejat AYDIN
|
||||
<mnaydin@yahoo.com> with input from Eli Schwartz
|
||||
<eschwartz@archlinux.org>
|
||||
|
||||
7/5
|
||||
---
|
||||
lib/readline/vi_mode.c
|
||||
- _rl_vi_done_inserting: make sure to close out all undo groups when
|
||||
the insert performed by a `c' command finishes. Report and fix from
|
||||
David Fries <David@Fries.net>
|
||||
|
||||
7/6
|
||||
---
|
||||
lib/readline/vi_mode.c
|
||||
- _rl_vi_domove_motion_cleanup: the `c' and `C' commands should enter
|
||||
insert mode even if the motion command doesn't delete any text. From
|
||||
a report by David Fries <David@Fries.net>
|
||||
|
||||
+3
-1
@@ -9339,7 +9339,9 @@ Read input from file descriptor \fIfd\fP.
|
||||
.PP
|
||||
If no
|
||||
.I names
|
||||
are supplied, the line read is assigned to the variable
|
||||
are supplied, the line read,
|
||||
without the ending delimiter but otherwise unmodified,
|
||||
is assigned to the variable
|
||||
.SM
|
||||
.BR REPLY .
|
||||
The exit status is zero, unless end-of-file is encountered, \fBread\fP
|
||||
|
||||
+9
-6
@@ -4584,12 +4584,6 @@ are used to split the line into words using the same rules the shell
|
||||
uses for expansion (described above in @ref{Word Splitting}).
|
||||
The backslash character @samp{\} may be used to remove any special
|
||||
meaning for the next character read and for line continuation.
|
||||
If no names are supplied, the line read is assigned to the
|
||||
variable @env{REPLY}.
|
||||
The exit status is zero, unless end-of-file is encountered, @code{read}
|
||||
times out (in which case the status is greater than 128),
|
||||
a variable assignment error (such as assigning to a readonly variable) occurs,
|
||||
or an invalid file descriptor is supplied as the argument to @option{-u}.
|
||||
|
||||
Options, if supplied, have the following meanings:
|
||||
|
||||
@@ -4666,6 +4660,15 @@ The exit status is greater than 128 if the timeout is exceeded.
|
||||
Read input from file descriptor @var{fd}.
|
||||
@end table
|
||||
|
||||
If no @var{name}s are supplied, the line read,
|
||||
without the ending delimiter but otherwise unmodified,
|
||||
is assigned to the
|
||||
variable @env{REPLY}.
|
||||
The exit status is zero, unless end-of-file is encountered, @code{read}
|
||||
times out (in which case the status is greater than 128),
|
||||
a variable assignment error (such as assigning to a readonly variable) occurs,
|
||||
or an invalid file descriptor is supplied as the argument to @option{-u}.
|
||||
|
||||
@item readarray
|
||||
@btindex readarray
|
||||
@example
|
||||
|
||||
+3
-3
@@ -2,10 +2,10 @@
|
||||
Copyright (C) 1988-2020 Free Software Foundation, Inc.
|
||||
@end ignore
|
||||
|
||||
@set LASTCHANGE Tue Jun 16 16:24:45 EDT 2020
|
||||
@set LASTCHANGE Thu Jul 2 09:04:32 EDT 2020
|
||||
|
||||
@set EDITION 5.1
|
||||
@set VERSION 5.1
|
||||
|
||||
@set UPDATED 16 June 2020
|
||||
@set UPDATED-MONTH June 2020
|
||||
@set UPDATED 2 July 2020
|
||||
@set UPDATED-MONTH July 2020
|
||||
|
||||
@@ -237,8 +237,11 @@ static sighandler
|
||||
alrm_catcher(i)
|
||||
int i;
|
||||
{
|
||||
printf (_("\007timed out waiting for input: auto-logout\n"));
|
||||
fflush (stdout);
|
||||
char *msg;
|
||||
|
||||
msg = _("\007timed out waiting for input: auto-logout\n");
|
||||
write (1, msg, strlen (msg));
|
||||
|
||||
bash_logout (); /* run ~/.bash_logout if this is a login shell */
|
||||
jump_to_top_level (EXITPROG);
|
||||
SIGRETURN (0);
|
||||
|
||||
@@ -132,7 +132,7 @@ ungetc_with_restart (c, stream)
|
||||
/* A facility similar to stdio, but input-only. */
|
||||
|
||||
#if defined (USING_BASH_MALLOC)
|
||||
# define MAX_INPUT_BUFFER_SIZE 8176
|
||||
# define MAX_INPUT_BUFFER_SIZE 8172
|
||||
#else
|
||||
# define MAX_INPUT_BUFFER_SIZE 8192
|
||||
#endif
|
||||
|
||||
@@ -319,11 +319,17 @@ static int queue_sigchld;
|
||||
|
||||
#define QUEUE_SIGCHLD(os) (os) = sigchld, queue_sigchld++
|
||||
|
||||
/* We set queue_sigchld around the call to waitchld to protect data structures
|
||||
from a SIGCHLD arriving while waitchld is executing. */
|
||||
#define UNQUEUE_SIGCHLD(os) \
|
||||
do { \
|
||||
queue_sigchld--; \
|
||||
if (queue_sigchld == 0 && os != sigchld) \
|
||||
waitchld (-1, 0); \
|
||||
{ \
|
||||
queue_sigchld = 1; \
|
||||
waitchld (-1, 0); \
|
||||
queue_sigchld = 0; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static SigHandler *old_tstp, *old_ttou, *old_ttin;
|
||||
@@ -2022,9 +2028,8 @@ print_pipeline (p, job_index, format, stream)
|
||||
reported asynchronously, so just add the CR if the shell is
|
||||
currently interactive and asynchronous notification is enabled. */
|
||||
if (asynchronous_notification && interactive)
|
||||
fprintf (stream, "\r\n");
|
||||
else
|
||||
fprintf (stream, "\n");
|
||||
putc ('\r', stream);
|
||||
fprintf (stream, "\n");
|
||||
}
|
||||
|
||||
if (p == last)
|
||||
|
||||
@@ -875,7 +875,7 @@ _rl_vi_done_inserting (void)
|
||||
{
|
||||
if (_rl_vi_doing_insert)
|
||||
{
|
||||
/* The `C', `s', and `S' commands set this. */
|
||||
/* The `c', `s', and `S' commands set this. */
|
||||
rl_end_undo_group ();
|
||||
/* Now, the text between rl_undo_list->next->start and
|
||||
rl_undo_list->next->end is what was inserted while in insert
|
||||
@@ -887,7 +887,6 @@ _rl_vi_done_inserting (void)
|
||||
_rl_vi_save_replace (); /* Half the battle */
|
||||
else
|
||||
_rl_vi_save_insert (rl_undo_list->next);
|
||||
vi_continued_command = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -899,10 +898,10 @@ _rl_vi_done_inserting (void)
|
||||
/* XXX - Other keys probably need to be checked. */
|
||||
else if (_rl_vi_last_key_before_insert == 'C')
|
||||
rl_end_undo_group ();
|
||||
while (_rl_undo_group_level > 0)
|
||||
rl_end_undo_group ();
|
||||
vi_continued_command = 0;
|
||||
}
|
||||
|
||||
while (_rl_undo_group_level > 0)
|
||||
rl_end_undo_group ();
|
||||
}
|
||||
|
||||
int
|
||||
@@ -1210,6 +1209,10 @@ _rl_vi_domove_motion_cleanup (int c, _rl_vimotion_cxt *m)
|
||||
/* No change in position means the command failed. */
|
||||
if (rl_mark == rl_point)
|
||||
{
|
||||
/* 'c' and 'C' enter insert mode after the delete even if the motion
|
||||
didn't delete anything, as long as the motion command is valid. */
|
||||
if (_rl_to_upper (m->key) == 'C' && _rl_vi_motion_command (c))
|
||||
return (vidomove_dispatch (m));
|
||||
RL_UNSETSTATE (RL_STATE_VIMOTION);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
@@ -8764,7 +8764,7 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta
|
||||
else
|
||||
#if defined (CASEMOD_EXPANSIONS)
|
||||
/* To enable case-toggling expansions using the `~' operator character
|
||||
change the 1 to 0. */
|
||||
define CASEMOD_CAPCASE in config-top.h */
|
||||
# if defined (CASEMOD_CAPCASE)
|
||||
name = string_extract (string, &t_index, "#%^,~:-=?+/@}", SX_VARNAME);
|
||||
# else
|
||||
|
||||
Reference in New Issue
Block a user