Skip to content

fix(term): run cmd blocks on plain-SSH hosts without wsh - #48

Merged
Atreus-X merged 2 commits into
mainfrom
fix/ssh-nowsh-cmd-block
Sep 30, 2026
Merged

Atreus-X merged 2 commits into
mainfrom
fix/ssh-nowsh-cmd-block

Conversation

@Atreus-X

@Atreus-X Atreus-X commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

Library Snippets > "Run in new terminal" on a remote host that has no wsh opened a shell but never ran the command. The plain-SSH path (startSshShellProcNoWsh) ignored cmdStr: for a cmd block it called session.Shell(), so the command was dropped. It now starts the command as the SSH session command (after cd <cwd> when a working directory is set), then execs the login shell so the terminal stays open at a prompt once the command finishes.

Also affects anything else that opens a cmd block on a no-wsh host, e.g. Host Inspector "open command" actions.

Routes

  • Plain SSH (no wsh): fixed here.
  • wsh: unchanged, already ran the command.
  • Not touched: WSL without wsh (StartWslShellProcNoWsh) also ignores cmdStr; left for a follow-up.

Test plan

  • Snippet docker ps, host without wsh, Run in new terminal: output appears and the terminal stays open at a prompt
  • Same snippet on a wsh host: still runs
  • Local snippet run still works
  • Host Inspector "open command" on a no-wsh host runs the command
  • A multi-word command with pipes (docker ps | head) runs on the no-wsh host

go vet ./pkg/blockcontroller/ clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01W6QMXXvRReaKxWk1JL5Et6

Atreus-X and others added 2 commits September 30, 2026 17:48
@Atreus-X Atreus-X mentioned this pull request Sep 30, 2026
@Atreus-X
Atreus-X merged commit 8b5c960 into main Sep 30, 2026
1 check 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.

1 participant