Skip to content

Use the remote user's login shell - #2

Open
nickadminroot wants to merge 3 commits into
MikeHolman:masterfrom
nickadminroot:fix/user-login-shell
Open

Use the remote user's login shell#2
nickadminroot wants to merge 3 commits into
MikeHolman:masterfrom
nickadminroot:fix/user-login-shell

Conversation

@nickadminroot

Copy link
Copy Markdown

Summary

  • replace the hardcoded bash --rcfile ... command with the remote account's executable $SHELL, falling back to the passwd login shell and /bin/sh
  • start Bash, Zsh, and Fish with their native login/startup semantics while installing shell-specific VS Code environment refresh hooks
  • proxy Zsh's .zshenv, .zprofile, .zshrc, and .zlogin in order without duplicate sourcing, and restore the original ZDOTDIR state
  • preserve tmux's standard SSH/display update-environment variables alongside the VS Code variables
  • reload changed tmux configuration with source-file instead of destroying persistent sessions with kill-server
  • add automated shell/tmux integration tests and a local ESLint/VSCE toolchain

Existing panes intentionally keep the shell process they were created with; newly created panes use the selected login shell.

For Bash, profiles that customize PROMPT_COMMAND should preserve its inherited value so Persisterm can continue refreshing VS Code IPC variables after reconnects.

Testing

  • npm run lint
  • npm test — 8/8 passing, including real tmux panes for Bash, Zsh, and Fish
  • npm audit --audit-level=high — 0 vulnerabilities
  • npm run package -- --out persisterm-user-shell.vsix
  • manual VSIX verification with Zsh over VS Code Remote SSH

Closes #1

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.

Support zsh (and other non-bash shells) as the tmux session shell

1 participant