Change run-shell expansion to just be #{1} etc not #1 which interferes

with colours.
This commit is contained in:
nicm
2026-06-03 20:18:49 +00:00
parent 642cc15b99
commit 580f9ced08
2 changed files with 1 additions and 11 deletions

View File

@@ -5598,7 +5598,7 @@ format_expand1(struct format_expand_state *es, const char *fmt)
const char *ptr, *s, *style_end = NULL; const char *ptr, *s, *style_end = NULL;
size_t off, len, n, outlen; size_t off, len, n, outlen;
int ch, brackets; int ch, brackets;
char expanded[8192], number[2] = { 0 }; char expanded[8192];
if (fmt == NULL || *fmt == '\0' || !format_check_time(es)) if (fmt == NULL || *fmt == '\0' || !format_check_time(es))
return (xstrdup("")); return (xstrdup(""));
@@ -5727,13 +5727,6 @@ format_expand1(struct format_expand_state *es, const char *fmt)
continue; continue;
default: default:
s = NULL; s = NULL;
if (ch >= '1' && ch <= '9') {
number[0] = ch;
if (format_replace(es, number, 1, &buf, &len,
&off) != 0)
break;
continue;
}
if (fmt > style_end) { /* skip inside #[] */ if (fmt > style_end) { /* skip inside #[] */
if (ch >= 'A' && ch <= 'Z') if (ch >= 'A' && ch <= 'Z')
s = format_upper[ch - 'A']; s = format_upper[ch - 'A'];

3
tmux.1
View File

@@ -7868,9 +7868,6 @@ section.
If If
.Ar argument .Ar argument
values are given, they are available as values are given, they are available as
.Ql #1 ,
.Ql #2
or
.Ql #{1} , .Ql #{1} ,
.Ql #{2} .Ql #{2}
and so on. and so on.