File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2256,9 +2256,14 @@ it.layer(
22562256 T3CODE_PORT : "3773" ,
22572257 VITE_DEV_SERVER_URL : "http://localhost:5173" ,
22582258 TEST_TERMINAL_KEEP : "keep-me" ,
2259+ TMUX : "/tmp/tmux-1000/default,1234,0" ,
2260+ TMUX_PANE : "%3" ,
2261+ ZELLIJ_SESSION_NAME : "work" ,
2262+ ZELLIJ_CONFIG_DIR : "/home/user/.config/zellij" ,
22592263 } ,
22602264 } ) ;
22612265 yield * manager . open ( openInput ( ) ) ;
2266+ yield * manager . open ( openInput ( { terminalId : "explicit" , env : { TMUX_PANE : "%9" } } ) ) ;
22622267 const spawnInput = ptyAdapter . spawnInputs [ 0 ] ;
22632268 expect ( spawnInput ) . toBeDefined ( ) ;
22642269 if ( ! spawnInput ) return ;
@@ -2267,6 +2272,11 @@ it.layer(
22672272 expect ( spawnInput . env . T3CODE_PORT ) . toBeUndefined ( ) ;
22682273 expect ( spawnInput . env . VITE_DEV_SERVER_URL ) . toBeUndefined ( ) ;
22692274 expect ( spawnInput . env . TEST_TERMINAL_KEEP ) . toBe ( "keep-me" ) ;
2275+ expect ( spawnInput . env . TMUX ) . toBeUndefined ( ) ;
2276+ expect ( spawnInput . env . TMUX_PANE ) . toBeUndefined ( ) ;
2277+ expect ( spawnInput . env . ZELLIJ_SESSION_NAME ) . toBeUndefined ( ) ;
2278+ expect ( spawnInput . env . ZELLIJ_CONFIG_DIR ) . toBe ( "/home/user/.config/zellij" ) ;
2279+ expect ( ptyAdapter . spawnInputs [ 1 ] ?. env . TMUX_PANE ) . toBe ( "%9" ) ;
22702280 } ) ,
22712281 ) ;
22722282
Original file line number Diff line number Diff line change @@ -98,7 +98,20 @@ const DEFAULT_PROCESS_KILL_GRACE_MS = 1_000;
9898const DEFAULT_MAX_RETAINED_INACTIVE_SESSIONS = 128 ;
9999const DEFAULT_OPEN_COLS = 120 ;
100100const DEFAULT_OPEN_ROWS = 30 ;
101- const TERMINAL_ENV_BLOCKLIST = new Set ( [ "PORT" , "ELECTRON_RENDERER_PORT" , "ELECTRON_RUN_AS_NODE" ] ) ;
101+ // The tmux/screen/Zellij keys name the multiplexer pane that launched the server,
102+ // so inheriting them points multiplexer-aware tools at that unrelated pane.
103+ const TERMINAL_ENV_BLOCKLIST = new Set ( [
104+ "PORT" ,
105+ "ELECTRON_RENDERER_PORT" ,
106+ "ELECTRON_RUN_AS_NODE" ,
107+ "TMUX" ,
108+ "TMUX_PANE" ,
109+ "STY" ,
110+ "WINDOW" ,
111+ "ZELLIJ" ,
112+ "ZELLIJ_SESSION_NAME" ,
113+ "ZELLIJ_PANE_ID" ,
114+ ] ) ;
102115const nowIso = Effect . map ( DateTime . now , DateTime . formatIso ) ;
103116const MAX_TERMINAL_LABEL_LENGTH = 128 ;
104117const decodeClaudeSettings = Schema . decodeUnknownOption ( ClaudeSettings ) ;
You can’t perform that action at this time.
0 commit comments