From d7f75ac985167eccd8786360635e25997b920ab7 Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 15 Jun 2025 21:57:58 +0000 Subject: [PATCH 1/2] Do not replace SHELL when using /bin/sh. From someone in GitHub issue 4528. --- job.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/job.c b/job.c index a8d4ba9c..d8d87792 100644 --- a/job.c +++ b/job.c @@ -176,7 +176,8 @@ job_run(const char *cmd, int argc, char **argv, struct environ *e, closefrom(STDERR_FILENO + 1); if (cmd != NULL) { - setenv("SHELL", shell, 1); + if (flags & JOB_DEFAULTSHELL) + setenv("SHELL", shell, 1); execl(shell, argv0, "-c", cmd, (char *)NULL); fatal("execl failed"); } else { From d82d9468b41defbe04bc9bfeddfa5891213df71e Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 15 Jun 2025 22:24:51 +0000 Subject: [PATCH 2/2] Expand mode-style with E: so # is correctly processed, GitHub issue 4533. --- options-table.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/options-table.c b/options-table.c index 36233f8a..a9f64291 100644 --- a/options-table.c +++ b/options-table.c @@ -1053,7 +1053,7 @@ const struct options_table_entry options_table[] = { { .name = "copy-mode-position-style", .type = OPTIONS_TABLE_STRING, .scope = OPTIONS_TABLE_WINDOW, - .default_str = "#{mode-style}", + .default_str = "#{E:mode-style}", .flags = OPTIONS_TABLE_IS_STYLE, .separator = ",", .text = "Style of position indicator in copy mode." @@ -1062,7 +1062,7 @@ const struct options_table_entry options_table[] = { { .name = "copy-mode-selection-style", .type = OPTIONS_TABLE_STRING, .scope = OPTIONS_TABLE_WINDOW, - .default_str = "#{mode-style}", + .default_str = "#{E:mode-style}", .flags = OPTIONS_TABLE_IS_STYLE, .separator = ",", .text = "Style of selection in copy mode."