version 1.45, 2014/05/13 07:34:35 |
version 1.46, 2014/05/13 08:08:32 |
|
|
cmd = get_proc_name(wp->fd, wp->tty); |
cmd = get_proc_name(wp->fd, wp->tty); |
if (cmd == NULL || *cmd == '\0') { |
if (cmd == NULL || *cmd == '\0') { |
free(cmd); |
free(cmd); |
cmd = xstrdup(wp->cmd); |
cmd = cmd_stringify_argv(wp->argc, wp->argv); |
if (cmd == NULL || *cmd == '\0') { |
if (cmd == NULL || *cmd == '\0') { |
free(cmd); |
free(cmd); |
cmd = xstrdup(wp->shell); |
cmd = xstrdup(wp->shell); |
|
|
if (wp->tty != NULL) |
if (wp->tty != NULL) |
format_add(ft, "pane_tty", "%s", wp->tty); |
format_add(ft, "pane_tty", "%s", wp->tty); |
format_add(ft, "pane_pid", "%ld", (long) wp->pid); |
format_add(ft, "pane_pid", "%ld", (long) wp->pid); |
if (wp->cmd != NULL) |
if ((cmd = cmd_stringify_argv(wp->argc, wp->argv)) != NULL) { |
format_add(ft, "pane_start_command", "%s", wp->cmd); |
format_add(ft, "pane_start_command", "%s", cmd); |
|
free(cmd); |
|
} |
if ((cmd = format_get_command(wp)) != NULL) { |
if ((cmd = format_get_command(wp)) != NULL) { |
format_add(ft, "pane_current_command", "%s", cmd); |
format_add(ft, "pane_current_command", "%s", cmd); |
free(cmd); |
free(cmd); |