Hi

Why not do this entirely in status_find_job?


On Tue, Jul 15, 2014 at 12:50:02PM -0400, Elliot Saba wrote:
>    The diff is available
>    
> here:**[1]https://gist.githubusercontent.com/staticfloat/9e58c9a479a9f541cc6c/raw/c8ad7d9ad8486e8382c06fcb01865fd216010eb1/preexpand.diff
>    -E
> 
>    On Tue, Jul 15, 2014 at 12:32 PM, Nicholas Marriott
>    <[2][email protected]> wrote:
> 
>      Email me the diff
> 
>      -------- Original message --------
>      From: Elliot Saba <[3][email protected]>
>      Date: 15/07/2014 17:18 (GMT+00:00)
>      To: Nicholas Marriott <[4][email protected]>
>      Cc: [5][email protected]
>      Subject: Re: Passing session name to external command in status bar
> 
>      If I wanted to get this (or an improved patch) merged into mainline
>      tmux, where would I submit a pull request to?
>      -E
> 
>      On Tue, Jul 15, 2014 at 3:32 AM, Elliot Saba <[6][email protected]>
>      wrote:
> 
>        I couldn't get that to work, so I went ahead and patched tmux to
>        expand format sequences contained within shell special sequences.
>        **[7]Here's the patch, not sure if the coding style is appropriate but
>        hopefully if this is something that is desirable for mainline tmux it
>        can be altered easily.
>        -E
> 
>        On Tue, Jul 15, 2014 at 2:31 AM, Nicholas Marriott
>        <[8][email protected]> wrote:
> 
>          Either use random junk or the session name but set status-right
>          individually to a different command for each session
> 
>          -------- Original message --------
>          From: Elliot Saba <[9][email protected]>
>          Date: 15/07/2014 07:08 (GMT+00:00)
>          To: Nicholas Marriott <[10][email protected]>
>          Cc: [11][email protected]
>          Subject: Re: Passing session name to external command in status bar
> 
>          Thanks, I was just debugging this right now.** ;)
> 
>          By "set a different status-right", do you mean I need to have the
>          actual
>          command itself be different?** E.g. if I put some pseudo-random junk
>          in my
>          command that I later ignore, tmux will treat them as separate
>          jobs?** Or is
>          there a better way?
>          -E
> 
>          On Tue, Jul 15, 2014 at 2:05 AM, Nicholas Marriott <
>          [12][email protected]> wrote:
> 
>          > What happens is that one session runs "~/tmuxtest.sh" and the
>          second
>          > sees it has been run and uses the same result. This is because
>          they are
>          > seen as the same job, because jobs are global. I don't think you
>          will be
>          > able to get this to work without changing tmux to either process
>          formats
>          > in the command before running it, or to treat jobs for different
>          clients
>          > as entirely separate. Alternatively set a different status-right
>          for
>          > each session when you create it.
>          >
>          >
>          > On Mon, Jul 14, 2014 at 12:38:39PM -0400, Elliot Saba wrote:
>          > >****** Unfortunately, that doesn't seem to work. **I'm testing
>          via the
>          > following:
>          > >
>          > >****** Put this in my .tmux.conf:
>          > >****** set -g status-right '#(~/tmuxtest.sh)'
>          > >****** set -g status-interval 1
>          > >
>          > >****** Put this in ~/tmuxtest.sh:
>          > >****** #!/bin/sh
>          > >****** tmux display-message -p "#S"
>          > >****** Then open up two separate tmux sessions, and you will see
>          that the
>          > >****** display-message**command is just using the latest session
>          created;
>          > which
>          > >****** is the default behavior of tmux when it has no explicit
>          session
>          > >****** information, I believe.
>          > >****** -E
>          > >****** On Mon, Jul 14, 2014 at 9:57 AM, Nicholas Marriott
>          > >****** <[1][13][email protected]> wrote:
>          > >
>          > >****
> 
> References
> 
>    Visible links
>    1. 
> https://gist.githubusercontent.com/staticfloat/9e58c9a479a9f541cc6c/raw/c8ad7d9ad8486e8382c06fcb01865fd216010eb1/preexpand.diff
>    2. mailto:[email protected]
>    3. mailto:[email protected]
>    4. mailto:[email protected]
>    5. mailto:[email protected]
>    6. mailto:[email protected]
>    7. https://gist.github.com/staticfloat/9e58c9a479a9f541cc6c
>    8. mailto:[email protected]
>    9. mailto:[email protected]
>   10. mailto:[email protected]
>   11. mailto:[email protected]
>   12. mailto:[email protected]
>   13. mailto:[email protected]

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
tmux-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to