Skip to content

fix: support shell args, tilde, user PATH for local connections#4

Merged
craig7351 merged 2 commits into
craig7351:mainfrom
ChrisLi826:fix/local-shell-args
May 8, 2026
Merged

fix: support shell args, tilde, user PATH for local connections#4
craig7351 merged 2 commits into
craig7351:mainfrom
ChrisLi826:fix/local-shell-args

Conversation

@ChrisLi826
Copy link
Copy Markdown

The Connection profile's shell field went straight to portable_pty's CommandBuilder, so entries like `screen.sh 2` were treated as a single binary name (whitespace included) and `~/...` paths were never expanded since OS exec doesn't do shell expansion. GUI-launched apps also inherit a stripped PATH that omits user bin dirs, so bare `screen.sh` couldn't be resolved either.

  • whitespace-split the shell field into program + args (no quote support yet — `a "b c"` becomes 3 tokens)
  • expand leading ~/ and bare ~ via $HOME for program, args, and cwd
  • prepend $HOME/.local/bin and $HOME/bin to PATH if missing
  • show the local-connection error panel with a plain Reconnect button instead of the SSH `@:22` password form

ChrisLi and others added 2 commits May 8, 2026 09:23
The Connection profile's shell field went straight to portable_pty's
CommandBuilder, so entries like \`screen.sh 2\` were treated as a single
binary name (whitespace included) and \`~/...\` paths were never expanded
since OS exec doesn't do shell expansion. GUI-launched apps also inherit
a stripped PATH that omits user bin dirs, so bare \`screen.sh\` couldn't
be resolved either.

- whitespace-split the shell field into program + args (no quote support
  yet — \`a "b c"\` becomes 3 tokens)
- expand leading ~/ and bare ~ via \$HOME for program, args, and cwd
- prepend \$HOME/.local/bin and \$HOME/bin to PATH if missing
- show the local-connection error panel with a plain Reconnect button
  instead of the SSH \`@:22\` password form

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The sessionId-resize createEffect added in the merged \"sync PTY size on
connect\" change reads the \`term\` ref directly. SolidJS schedules effects
to run after the component body but before onMount callbacks, so when
the tab is auto-reconnected from saved state the effect's first pass
sees \`term\` undefined, bails, and never re-fires (term isn't reactive).
Net result: the PTY stays at the placeholder 80x24.

Gate the effect on a \`termReady\` signal flipped at the end of onMount
so it re-runs once \`term\` is actually wired up.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@craig7351 craig7351 merged commit 35ef366 into craig7351:main May 8, 2026
3 checks passed
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.

2 participants