feat: Add C-b n/p keybindings for crew session cycling

When multiple crew sessions exist in the same rig, C-b n cycles to next
and C-b p cycles to previous. Sessions are sorted alphabetically and
wrap around.

Implementation:
- crew_cycle.go: Hidden `gt crew next/prev` commands for tmux to call
- crew_helpers.go: parseCrewSessionName and findRigCrewSessions helpers
- crew_at.go: Calls SetCrewCycleBindings on session creation

🤖 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-25 11:51:48 -08:00
parent 0095fee81c
commit 62f603bbe1
4 changed files with 16 additions and 43 deletions

View File

@@ -11,8 +11,11 @@ import (
// cycleCrewSession switches to the next or previous crew session in the same rig.
// direction: 1 for next, -1 for previous
func cycleCrewSession(direction int) error {
// Get current session
currentSession := getCurrentTmuxSession()
// Get current session (uses existing function from handoff.go)
currentSession, err := getCurrentTmuxSession()
if err != nil {
return fmt.Errorf("not in a tmux session: %w", err)
}
if currentSession == "" {
return fmt.Errorf("not in a tmux session")
}
@@ -55,7 +58,6 @@ func cycleCrewSession(direction int) error {
if targetIdx == currentIdx {
// Only one session, nothing to switch to
fmt.Printf("Only one crew session in rig %s\n", rigName)
return nil
}