On Thu, Mar 26, 2015 at 6:53 AM, Robert LeBlanc <rob...@leblancnet.us> wrote:
> I'm trying to make my .tmux.conf work for both 1.8 and 1.9 while
> depreciating the old syntax. I can't get 1.9 (from Debian) or 1.9a (compiled
> from source) to work properly. I open a new tmux session and run:
>
> if-shell "[[ `/usr/bin/tmux -V` = *1.9* ]]" "display-message 'Yes'"
> "display-message 'No'"
>
> I always get "No". If I open up tmux on CentOS7 with 1.8 and adjust the line
> to test for 1.8, I get "Yes" as expected. I get "No" if I change it to 1.9.
> So it is working just fine in 1.8.

Are you sure it's not due to different shells and the use of "[[ ]]"
instead of "[ ]" ?

> dash -c '[[ "`tmux -V`" = *2.0* ]]'; echo $?
dash: 1: [[: not found
127
> bash -c '[[ "`tmux -V`" = *2.0* ]]'; echo $?
0

Also, note the additional double quotes for the call to `tmux -V`.

Cheers,

-- 
A: Because it destroys the flow of conversation.
Q: Why is top posting dumb?

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to