feat(settings): configurable shell command for new terminals - #133
Open
andrewheumann wants to merge 1 commit into
Open
feat(settings): configurable shell command for new terminals#133andrewheumann wants to merge 1 commit into
andrewheumann wants to merge 1 commit into
Conversation
Adds a "Shell command" input under Settings → Terminal that overrides the binary launched for new PTY sessions. Empty value falls back to $SHELL (current behavior), letting users point Collaborator at fish, nushell, or a non-default bash/zsh without changing the system login shell. The override is applied through a single resolveShellPath() helper in terminal-target.ts, consumed by both the sidecar and tmux code paths in pty.ts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the Contributor License Agreement (CLA) and hereby sign the CLA. |
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
Adds a "Shell command" field in Settings → Terminal that overrides the binary launched for new terminal sessions. Useful for users who want Collaborator to spawn
fish,nushell, a non-defaultbash, etc. without changing their system login shell.Empty value falls back to
$SHELL(existing behavior), so this is purely additive — no effect for users who don't opt in.Changes
ui.terminalCommandpref (string; empty/unset = default).resolveShellPath()interminal-target.tscentralizes the lookup: config override (if it resolves onPATH) →$SHELL→ platformdefault. If the configured binary isn't found, new terminals silently fall back instead of spawning-and-failing.
resolveTerminalTarget()call.tmux new-session(previously tmux fell back to itsdefault-shell,ignoring the config).
PATH(e.g.fish) or an absolute path (e.g./bin/bash). Live-validates againstwhich; a missing binary shows a red outline + inline hint so the fallback behavior is neversurprising.
terminal:check-shell-commandbacking the validation.Test plan
$SHELLas before.fish(onPATH) → new terminals spawn fish. Tile title showsfish./bin/bash→ new terminals spawn bash./nope/does-not-exist→ input shows red "Not found on PATH" hint; new terminals fall back to default (no open-then-close).