mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-10 21:50:49 +02:00
globbing reacts to signals more quickly; new printf %Q format specifier; readline completion handles multiline quotes better
This commit is contained in:
+2
-2
@@ -956,7 +956,7 @@ glob_vector (pat, dir, flags)
|
||||
/* compat: if GX_ADDCURDIR, add the passed directory also. Add an empty
|
||||
directory name as a placeholder if GX_NULLDIR (in which case the passed
|
||||
directory name is "."). */
|
||||
if (add_current)
|
||||
if (add_current && lose == 0)
|
||||
{
|
||||
sdlen = strlen (dir);
|
||||
nextname = (char *)malloc (sdlen + 1);
|
||||
@@ -986,7 +986,7 @@ glob_vector (pat, dir, flags)
|
||||
lose |= name_vector == NULL;
|
||||
}
|
||||
|
||||
/* Have we run out of memory? */
|
||||
/* Have we run out of memory or been interrupted? */
|
||||
if (lose)
|
||||
{
|
||||
tmplink = 0;
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
along with Bash. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
extern int interrupt_state, terminating_signal;
|
||||
|
||||
struct STRUCT
|
||||
{
|
||||
CHAR *pattern;
|
||||
@@ -81,6 +83,9 @@ fprintf(stderr, "gmatch: pattern = %s; pe = %s\n", pattern, pe);
|
||||
|
||||
sc = n < se ? *n : '\0';
|
||||
|
||||
if (interrupt_state || terminating_signal)
|
||||
return FNM_NOMATCH;
|
||||
|
||||
#ifdef EXTENDED_GLOB
|
||||
/* EXTMATCH () will handle recursively calling GMATCH, so we can
|
||||
just return what EXTMATCH() returns. */
|
||||
|
||||
Reference in New Issue
Block a user