-
Notifications
You must be signed in to change notification settings - Fork 112
Commit feabf56
committed
feat: Add critical async pane methods (asend_keys, acapture_pane, asplit)
Implement the three most essential async methods for Pane class, enabling
80% of async workflow value. These methods unlock non-blocking automation
across multiple panes.
New async methods:
- Pane.asend_keys(): Non-blocking command execution
* Supports all parameters: enter, suppress_history, literal
* Enables concurrent command execution across multiple panes
* 4 executable doctests (basic, no-enter, literal, concurrent)
- Pane.acapture_pane(): Non-blocking output capture
* Supports line range parameters: start, end
* Enables parallel output retrieval from multiple panes
* 3 executable doctests (basic, range, concurrent)
- Pane.asplit(): Non-blocking pane creation
* Supports all split parameters: direction, size, directory, environment
* Enables concurrent pane layout creation
* 4 executable doctests (basic, vertical, size, concurrent)
Total: 11 new executable doctests, all passing
Pattern used:
- asyncio.run() wrapper for doctests (proven pattern)
- await self.acmd() for all async operations
- Proper cleanup in all doctests
- Cross-references to sync versions
Impact:
These three methods enable the core async use cases:
1. Send commands to multiple panes in parallel
2. Capture output from multiple panes concurrently
3. Create complex pane layouts asynchronously
Related: Phase 1 of async expansion plan
Next: Add comprehensive tests in tests/asyncio/test_pane.py1 parent 2e66b3e commit feabf56Copy full SHA for feabf56
File tree
Expand file treeCollapse file tree
1 file changed
+456
-0
lines changedOpen diff view settings
Filter options
- src/libtmux
Expand file treeCollapse file tree
1 file changed
+456
-0
lines changedOpen diff view settings
0 commit comments