fix(tmux): pick per-instance ports and restore pane cleanup
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
function cc --wraps='opencode --continue' --description 'opencode --continue (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 --continue $argv
|
||||
tmux new-session opencode --port $port --continue $argv
|
||||
else
|
||||
opencode --continue $argv
|
||||
opencode --port $port --continue $argv
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user