Problem using pipe-pane

2011-07-27 Thread Jason Axelson
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


test.sh
Description: Bourne shell script
--
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


Re: Problem using pipe-pane

2011-07-28 Thread Jason Axelson
Yes it looks like I missed that .0. But for some reason :consumer.0
isn't working for me for send-keys so I've changed all the commands to
use the index of the window instead of the name.

When I run the script this is the output I get:
$ ./test.sh
rm: cannot remove `/tmp/wait': No such file or directory
cat: /tmp/wait: No such file or directory

Here is the updated 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}:1.0 'cat > /tmp/wait'
sleep 1
tmux send-keys -t ${session}:1.0 "echo build" C-m
sleep 2
tmux pipe-pane -o -t ${session}:1.0

cat /tmp/wait


On Wed, Jul 27, 2011 at 9:22 PM, Nicholas Marriott
 wrote:
> 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
>
>


test.sh
Description: Bourne shell script
--
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


Re: Log entire session with pipe-pane? Examples please.

2011-10-09 Thread Jason Axelson
Hi Jesse,

I think this is a bug of tmux where pipe-pane only works inside of a
tmux client. See my initial report on the mailing list:
http://www.mail-archive.com/tmux-users@lists.sourceforge.net/msg01883.html

And Nicholas' response with a patch:
http://www.mail-archive.com/tmux-users@lists.sourceforge.net/msg01886.html

Unfortunately I never got around to testing the patch (mostly because
of me being lazy and not wanting to learn cvs). I'm not sure if this
patch has been included in any tmux releases or source control.

Jason

On Sun, Oct 9, 2011 at 12:30 PM, Jesse Molina  wrote:
> ant to tee the session to a log file.
>
> I read that you can do this with pipe-pane, but I am apparently doing
> something wrong and it's not working for me at all.
>
> It works fine when I add a bind-key configuration item, but it won't
> work at all as a regular command.  Example;
>
> tmux pipe-pane -o

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users