Are you sure you shouldn't be doing "send-keys -t ${session}:consumer.0" as 
well?



On Wed, Jul 27, 2011 at 07:10:59PM -1000, Jason Axelson wrote:
> Hi,
> 
> I seem to be having some trouble understanding how pipe-pane should
> work. It seems like it will only capture output if the pane is
> currently selected by a client? So the following doesn't work (also
> attached as a script):
> 
> #!/bin/bash
> session="scenario1"
> 
> rm /tmp/wait
> 
> tmux new-session -d -s $session
> 
> tmux new-window -t ${session}:1 -n 'consumer'
> tmux pipe-pane -t ${session}:consumer.0 'cat > /tmp/wait'
> sleep 1
> tmux send-keys -t ${session}:consumer "echo build" C-m
> sleep 5
> tmux pipe-pane -o -t ${session}:consumer.0
> 
> cat /tmp/wait
> 
> 
> Instead I expect the cat /tmp/wait to output "build" and then my prompt.
> 
> What am I missing? Maybe there's a better way to capture the contents
> of a window?
> 
> By the way, I really enjoy tmux, and scripting it is really enjoyable.
> 
> Thanks,
> Jason


> ------------------------------------------------------------------------------
> Got Input?   Slashdot Needs You.
> Take our quick survey online.  Come on, we don't ask for help often.
> Plus, you'll get a chance to win $100 to spend on ThinkGeek.
> http://p.sf.net/sfu/slashdot-survey

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


------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to