Extract SupportedShells constant to constants package (gt-4u682)

- Added constants.SupportedShells for consistent shell list
- Updated 7 usages across start.go, crew_lifecycle.go, crew_helpers.go, tmux.go
- All tests pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-28 16:40:39 -08:00
parent bf7d28082f
commit 4f94ba2b6b
4 changed files with 12 additions and 4 deletions

View File

@@ -8,6 +8,7 @@ import (
"strings"
"syscall"
"github.com/steveyegge/gastown/internal/constants"
"github.com/steveyegge/gastown/internal/crew"
"github.com/steveyegge/gastown/internal/git"
"github.com/steveyegge/gastown/internal/rig"
@@ -137,7 +138,7 @@ func detectCrewFromCwd() (*crewDetection, error) {
// isShellCommand checks if the command is a shell (meaning Claude has exited).
func isShellCommand(cmd string) bool {
shells := []string{"bash", "zsh", "sh", "fish", "tcsh", "ksh"}
shells := constants.SupportedShells
for _, shell := range shells {
if cmd == shell {
return true

View File

@@ -8,6 +8,7 @@ import (
"time"
"github.com/spf13/cobra"
"github.com/steveyegge/gastown/internal/constants"
"github.com/steveyegge/gastown/internal/crew"
"github.com/steveyegge/gastown/internal/mail"
"github.com/steveyegge/gastown/internal/style"
@@ -248,7 +249,7 @@ func runCrewRestart(cmd *cobra.Command, args []string) error {
}
// Wait for Claude to start, then prime it
shells := []string{"bash", "zsh", "sh", "fish", "tcsh", "ksh"}
shells := constants.SupportedShells
if err := t.WaitForCommand(sessionID, shells, 15*time.Second); err != nil {
style.PrintWarning("Timeout waiting for Claude to start: %v", err)
}
@@ -413,7 +414,7 @@ func restartCrewSession(rigName, crewName, clonePath string) error {
}
// Wait for Claude to start, then prime it
shells := []string{"bash", "zsh", "sh", "fish", "tcsh", "ksh"}
shells := constants.SupportedShells
if err := t.WaitForCommand(sessionID, shells, 15*time.Second); err != nil {
// Non-fatal warning
}