modify way bash avoids running traps in subshells that haven't reset the trap strings yet; new readline bindable command 'shell-expand-and-requote-line'

This commit is contained in:
Chet Ramey
2026-01-14 11:08:22 -05:00
parent e7c3acf108
commit a6421d8419
13 changed files with 194 additions and 50 deletions
+2 -1
View File
@@ -1,7 +1,7 @@
/* command.h -- The structures used internally to represent commands, and
the extern declarations of the functions used to create them. */
/* Copyright (C) 1993-2022 Free Software Foundation, Inc.
/* Copyright (C) 1993-2026 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -126,6 +126,7 @@ enum command_type { cm_for, cm_case, cm_while, cm_if, cm_simple, cm_select,
#define SUBSHELL_COPROC 0x40 /* subshell from a coproc pipeline */
#define SUBSHELL_RESETTRAP 0x80 /* subshell needs to reset trap strings on first call to trap */
#define SUBSHELL_IGNTRAP 0x100 /* subshell should reset trapped signals from trap_handler */
#define SUBSHELL_RESETJOBS 0x200 /* subshell should clear the jobs list */
/* A structure which represents a word. */
typedef struct word_desc {