update fix to save history if fatal signal arrives during $PROMPT_COMMAND execution; fix issue with extglob and empty patterns preceding pattern beginning with a `.'

This commit is contained in:
Chet Ramey
2026-03-24 10:10:30 -04:00
parent 1f292e433e
commit 55f721c51e
22 changed files with 3626 additions and 3540 deletions
+3 -1
View File
@@ -263,6 +263,8 @@ cutfields (SHELL_VAR *v, arrayind_t ind, char *line, struct cutop *ops)
size_t llen, fsize;
int i, b, n, s, e, nf;
llen = strlen(line);
delim[0] = ops->delim;
delim[1] = '\0';
@@ -318,7 +320,7 @@ cutfields (SHELL_VAR *v, arrayind_t ind, char *line, struct cutop *ops)
}
/* build the string and assign or print it all at once */
buf = xmalloc (strlen (line) + 1);
buf = xmalloc (llen + 1);
for (i = 1, n = b = 0; b < nf; b++)
{