Actually no you can't but try this and you can get it from formats using
eg display -p '#{pane_current_command}':

diff --git a/format.c b/format.c
index bd81799..993728c 100644
--- a/format.c
+++ b/format.c
@@ -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);


On Fri, Feb 22, 2013 at 07:39:59AM -0800, Aaron Jensen wrote:
>    The active command is pulled out to be put in the window name, i'm
>    wondering if there is any way to access it from tmux otherwise?
>    Specifically, I'd like to have a tmux binding that does different things
>    depending on what the active command is.
>    Thanks,
>    Aaron

> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb

> _______________________________________________
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to