Thanks Chris, I used your proposed solution of creating an alternative
config file for use by tmux on OS X.

On Wed, Sep 5, 2012 at 6:02 AM, Chris Johnsen <chris_john...@pobox.com>wrote:

> On Tue, Sep 4, 2012 at 6:02 PM, Samer Atiani <sati...@gmail.com> wrote:
> > I have the following line in my .tmux.conf:
> >
> > if-shell 'test `uname` == "Darwin"' 'set-option -g default-command
> > "reattach-to-user-namespace -l zsh"'
> ...
> > However, this seems to only take effect
> > on the second window created in tmux, not on the first one that shows up
> > when tmux is first invoked.
>
> This happens because if-shell (and run-shell) run their commands
> asynchronously ("in the background"). The first window is created before
> shell process has finished (thus before the new value for default-command
> has been established).
>
> I have previously discussed this issue at the following location:
>
>     https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/issues/8
>
> > Is there a way to make the if-shell/default-command
> > combination apply for the first window created by tmux when a session is
> > started?
>
> There is a mention in the TODO file ("if-shell/run-shell should
> block"...), but I
> do not know of any implementations.
>
>
> http://tmux.git.sourceforge.net/git/gitweb.cgi?p=tmux/tmux;a=commitdiff;h=d6b5b644b83ad2a3cfc28dda0ae9af537da8b7f2
>
> --
> Chris
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to