diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2014-06-18 09:31:07 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2014-06-18 09:31:07 +0100 |
commit | 77f582ff137808cc3743ad545f63422cc8e71a71 (patch) | |
tree | 5737aa67c96dcd11d3474989889189732e374900 /format.c | |
parent | f5973b77763e3f8da8e8f6483464f6f4bc2f3981 (diff) | |
parent | 92af7f5901bd944e385e7fdbe8696b2c911ed776 (diff) | |
download | rtmux-77f582ff137808cc3743ad545f63422cc8e71a71.tar.gz rtmux-77f582ff137808cc3743ad545f63422cc8e71a71.tar.bz2 rtmux-77f582ff137808cc3743ad545f63422cc8e71a71.zip |
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
Diffstat (limited to 'format.c')
-rw-r--r-- | format.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -368,7 +368,7 @@ format_get_command(struct window_pane *wp) cmd = osdep_get_name(wp->fd, wp->tty); if (cmd == NULL || *cmd == '\0') { free(cmd); - cmd = xstrdup(wp->cmd); + cmd = cmd_stringify_argv(wp->argc, wp->argv); if (cmd == NULL || *cmd == '\0') { free(cmd); cmd = xstrdup(wp->shell); @@ -559,10 +559,12 @@ format_window_pane(struct format_tree *ft, struct window_pane *wp) if (wp->tty != NULL) format_add(ft, "pane_tty", "%s", wp->tty); format_add(ft, "pane_pid", "%ld", (long) wp->pid); - if (wp->cmd != NULL) - format_add(ft, "pane_start_command", "%s", wp->cmd); if ((cwd = osdep_get_cwd(wp->fd)) != NULL) format_add(ft, "pane_current_path", "%s", cwd); + if ((cmd = cmd_stringify_argv(wp->argc, wp->argv)) != NULL) { + format_add(ft, "pane_start_command", "%s", cmd); + free(cmd); + } if ((cmd = format_get_command(wp)) != NULL) { format_add(ft, "pane_current_command", "%s", cmd); free(cmd); @@ -610,6 +612,7 @@ format_paste_buffer(struct format_tree *ft, struct paste_buffer *pb, char *s; format_add(ft, "buffer_size", "%zu", pb->size); + format_add(ft, "buffer_name", "%s", pb->name); s = paste_make_sample(pb, utf8flag); format_add(ft, "buffer_sample", "%s", s); |