fix(tmux): pick per-instance ports and restore pane cleanup
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
function c --wraps=opencode --description 'opencode (auto-starts tmux for visual subagent panes)'
|
||||
set -l port (python -c 'import socket; s=socket.socket(); s.bind(("127.0.0.1", 0)); print(s.getsockname()[1]); s.close()')
|
||||
|
||||
if not set -q TMUX
|
||||
tmux new-session opencode $argv
|
||||
tmux new-session opencode --port $port $argv
|
||||
else
|
||||
opencode $argv
|
||||
opencode --port $port $argv
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user