fix: spawn sidebar via sh -c for non-POSIX login shells#54
Open
hapticdata wants to merge 1 commit into
Open
Conversation
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>
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fish: ${ is not a variable.split-windowruns the spawn command through the user'sdefault-shell($SHELL), but the command string uses POSIX parameter expansion${OPENSESSIONS_DIR:-.}, which fish (and csh/tcsh) can't parse.sh -c(reusing the existingshell_quotehelper) 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.rs—spawn_sidebarnow builds the inner command as before and passes it tosh -c <quoted>instead of relying on the login shell to parse${VAR:-default}.Test plan
fish(or another non-POSIX shell) as$SHELL, start opensessions and confirm the sidebar pane launches instead of showingfish: ${ is not a variable.bash/zshas$SHELL, confirm the sidebar still launches andOPENSESSIONS_DIRfallback still resolves correctly.cargo build --releasesucceeds.🤖 Generated with Claude Code