Skip to content

Fix terminal spawning#3

Merged
nedtwigg merged 4 commits intomainfrom
feat/terminal-spawning
Mar 28, 2026
Merged

Fix terminal spawning#3
nedtwigg merged 4 commits intomainfrom
feat/terminal-spawning

Conversation

@nedtwigg
Copy link
Copy Markdown
Member

No description provided.

nedtwigg and others added 4 commits March 27, 2026 14:59
When spawning a new PTY via pty:spawn, default the cwd to the first
workspace folder if none is explicitly provided. Previously, new
terminals inherited the extension host's working directory (typically
home), while only restored sessions correctly used the saved cwd.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Standalone MouseTerm was spawning a non-login shell, so brew shellenv
(and anything else in ~/.zprofile) never ran—causing tools like asdf
to be missing from PATH. Pass a `-<shell>` argv[0] to node-pty so the
shell runs in login mode, matching Terminal.app, iTerm2, and VSCode.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
node-pty sets argv[0] to the shell path and passes args as argv[1..n],
so `-zsh` was being interpreted as CLI flags (`-z`, `s`, `h`), breaking
the shell. Use the standard `-l` flag which all POSIX shells support.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3aac0ee
Status:⚡️  Build in progress...

View logs

@nedtwigg nedtwigg merged commit 5c7f36f into main Mar 28, 2026
2 of 3 checks passed
@nedtwigg nedtwigg deleted the feat/terminal-spawning branch March 28, 2026 03:06
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