Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integrations/tmux-plugin/scripts/server-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ ensure_server() {
OPENSESSIONS_PORT="$PORT" \
OPENSESSIONS_PID_FILE="$PID_FILE" \
OPENSESSIONS_DIR="$PLUGIN_DIR" \
"$RUST_SERVER_BIN" >"$SERVER_LOG" 2>&1 &
nohup "$RUST_SERVER_BIN" >"$SERVER_LOG" 2>&1 &

attempt=0
while [ "$attempt" -lt 30 ]; do
Expand Down
5 changes: 3 additions & 2 deletions packages/runtime-rs/src/tmux_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -820,9 +820,10 @@ impl MuxProvider for TmuxProvider {
// pane works even when the parent pane's cwd is unrelated to the
// workspace (e.g. tmux sessions whose default cwd is `$HOME`). Falls
// back to the literal path if the env is unset.
let session_name = target.session_name.replace('\'', "'\\''");
let window_id_escaped = window_id.replace('\'', "'\\''");
let command = format!(
"OPENSESSIONS_SESSION_NAME={} OPENSESSIONS_WINDOW_ID={window_id} REFOCUS_WINDOW={window_id} exec \"${{OPENSESSIONS_DIR:-.}}\"/{scripts_dir}/start.sh",
target.session_name,
"sh -c 'OPENSESSIONS_SESSION_NAME=\"{session_name}\" OPENSESSIONS_WINDOW_ID=\"{window_id_escaped}\" REFOCUS_WINDOW=\"{window_id_escaped}\" exec \"${{OPENSESSIONS_DIR:-.}}\"/{scripts_dir}/start.sh'",
);
let new_pane = self.client.split_sidebar_pane(
&target.id,
Expand Down