GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — here mode level 2: eliminate send_keys entirely — split-window/swap-pane/kill-pane · Issue #1032 · tmux-python/tmuxp Open DescriptionParent: #1030 ApproachEliminate all Core ideaInstead of sending ImplementationReplace # Before: send_keys cd, export, shell into existing pane active_pane.send_keys(f"cd {shlex.quote(start_directory)}", enter=True) for _ekey, _eval in environment.items(): _here_pane.send_keys(f"export {_ekey}={shlex.quote(str(_eval))}", enter=True) _here_pane.send_keys(window_shell, enter=True) With: # After: create fresh pane with correct state, swap into position _active_pane = window.active_pane assert _active_pane is not None # Build split-window args split_kwargs: dict[str, t.Any] = {} if start_directory: split_kwargs["start_directory"] = start_directory if environment: split_kwargs["environment"] = environment if window_shell: split_kwargs["shell"] = window_shell # Create new pane with correct dir/env/shell via tmux primitives new_pane = window.split(**split_kwargs) # Swap new pane into the position of the original new_pane.cmd("swap-pane", "-t", _active_pane.pane_id) # Kill the original pane (now in the split position) _active_pane.kill() How this maps to tmux commandstmux version requirements
Comparison with teamocilteamocil uses Trade-offsPros:
Cons:
Behavioral changeThis changes Tests to add/update
libtmux prerequisitesCheck whether
If not, these would need to be added to libtmux first. ActivityMetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |