diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2013-02-22 16:25:21 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2013-02-22 16:25:21 +0000 |
commit | 1db4ec6e6327aa4b879e42f5e37a2c599f487206 (patch) | |
tree | 0d77b3b700672a2c628803335e249cadb4850f1d /format.c | |
parent | 7d3c1016ce33d8a74af7b876e8e7c9ca00452ec1 (diff) | |
download | rtmux-1db4ec6e6327aa4b879e42f5e37a2c599f487206.tar.gz rtmux-1db4ec6e6327aa4b879e42f5e37a2c599f487206.tar.bz2 rtmux-1db4ec6e6327aa4b879e42f5e37a2c599f487206.zip |
Add pane_current_command format.
Diffstat (limited to 'format.c')
-rw-r--r-- | format.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -377,6 +377,7 @@ format_window_pane(struct format_tree *ft, struct window_pane *wp) u_int i; u_int idx; const char *cwd; + const char *cmd; size = 0; for (i = 0; i < gd->hsize; i++) { @@ -410,6 +411,8 @@ format_window_pane(struct format_tree *ft, struct window_pane *wp) format_add(ft, "pane_start_path", "%s", wp->cwd); if ((cwd = osdep_get_cwd(wp->fd)) != NULL) format_add(ft, "pane_current_path", "%s", cwd); + if ((cmd = osdep_get_name(wp->fd, wp->tty)) != NULL) + format_add(ft, "pane_current_command", "%s", cmd); format_add(ft, "cursor_x", "%d", wp->base.cx); format_add(ft, "cursor_y", "%d", wp->base.cy); |