Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'

* refs/remotes/tmux-openbsd/master:
  Add format variables for the cmdline property to OSC 133, GitHub issue 5711.
This commit is contained in:
tmux update bot
2026-10-13 15:17:52 +00:00
6 changed files with 76 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: format.c,v 1.427 2026/10/12 12:22:42 nicm Exp $ */
/* $OpenBSD: format.c,v 1.428 2026/10/13 10:21:58 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -2354,6 +2354,17 @@ format_cb_pane_last_prompt_time(struct format_tree *ft)
return (NULL);
}
/* Callback for pane_command_line. */
static void *
format_cb_pane_command_line(struct format_tree *ft)
{
struct window_pane *wp = ft->wp;
if (wp != NULL && wp->cmd_line != NULL)
return (xstrdup(wp->cmd_line));
return (NULL);
}
/* Callback for pane_command_start_time. */
static void *
format_cb_pane_command_start_time(struct format_tree *ft)
@@ -3843,6 +3854,9 @@ static const struct format_table_entry format_table[] = {
{ "pane_command_end_time", FORMAT_TABLE_TIME,
format_cb_pane_command_end_time
},
{ "pane_command_line", FORMAT_TABLE_STRING,
format_cb_pane_command_line
},
{ "pane_command_running", FORMAT_TABLE_STRING,
format_cb_pane_command_running
},