Skip to content

Commit ed4aaa9

Browse files
ritiektony
authored andcommitted
Capture text from pane
1 parent f014199 commit ed4aaa9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

libtmux/pane.py

+12
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,18 @@ def enter(self):
241241
"""
242242
self.cmd('send-keys', 'Enter')
243243

244+
def capture_pane(self):
245+
"""
246+
Capture text from pane.
247+
248+
``$ tmux capture-pane`` to pane.
249+
250+
Returns
251+
-------
252+
:class:`list`
253+
"""
254+
return self.cmd('capture-pane', '-p').stdout
255+
244256
def select_pane(self):
245257
"""
246258
Select pane. Return ``self``.

0 commit comments

Comments
 (0)