Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ed4aaa9

Browse files
ritiektony
authored andcommittedMay 20, 2018
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

Lines changed: 12 additions & 0 deletions
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)
Please sign in to comment.