Skip to content

fix: spawn sidebar via sh -c for non-POSIX login shells#54

Open
hapticdata wants to merge 1 commit into
Ataraxy-Labs:mainfrom
hapticdata:fix/sidebar-posix-shell-spawn
Open

fix: spawn sidebar via sh -c for non-POSIX login shells#54
hapticdata wants to merge 1 commit into
Ataraxy-Labs:mainfrom
hapticdata:fix/sidebar-posix-shell-spawn

Conversation

@hapticdata

Copy link
Copy Markdown

Summary

  • The sidebar fails to launch for users whose login shell is non-POSIX (e.g. fish), erroring with fish: ${ is not a variable.
  • tmux split-window runs the spawn command through the user's default-shell ($SHELL), but the command string uses POSIX parameter expansion ${OPENSESSIONS_DIR:-.}, which fish (and csh/tcsh) can't parse.
  • Fix wraps the command in sh -c (reusing the existing shell_quote helper) so the POSIX syntax is always interpreted by a POSIX shell, regardless of the user's login shell.

Changes

  • packages/runtime-rs/src/tmux_provider.rsspawn_sidebar now builds the inner command as before and passes it to sh -c <quoted> instead of relying on the login shell to parse ${VAR:-default}.

Test plan

  • With fish (or another non-POSIX shell) as $SHELL, start opensessions and confirm the sidebar pane launches instead of showing fish: ${ is not a variable.
  • With bash/zsh as $SHELL, confirm the sidebar still launches and OPENSESSIONS_DIR fallback still resolves correctly.
  • cargo build --release succeeds.

🤖 Generated with Claude Code

tmux `split-window` runs the sidebar spawn command through the user's
`default-shell` (`$SHELL`). The command used POSIX parameter expansion
(`${OPENSESSIONS_DIR:-.}`), which non-POSIX shells such as fish cannot
parse, failing with `fish: ${ is not a variable` and preventing the
sidebar from launching.

Wrap the command in `sh -c` (reusing the existing `shell_quote` helper)
so the POSIX syntax is always interpreted by a POSIX shell regardless of
the user's login shell.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@inspect-review inspect-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inspect review

Triage: 2 entities analyzed | 0 critical, 0 high, 2 medium, 0 low
Verdict: standard_review

Findings (0)


Reviewed by inspect | Entity-level triage found 0 high-risk changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant