Add ghostty support to zen.#1
Conversation
|
Could you please rebase on |
| cmd.Flags().IntVarP(&resumeSession, "session", "s", 0, "Resume Nth session instead of most recent (1-based)") | ||
| cmd.Flags().BoolVarP(&resumeList, "list", "l", false, "List available sessions without resuming") | ||
| cmd.Flags().BoolVar(&resumeNoITerm, "no-iterm", false, "Print the resume command instead of opening iTerm2") | ||
| cmd.Flags().BoolVar(&resumeNoITerm, "no-terminal", false, "Print the resume command instead of opening terminal") |
There was a problem hiding this comment.
The comment on line 225 above this function still says --no-iterm:
// addResumeFlags adds the shared --session, --list, --no-iterm flags to a cobra command.Should reference --no-terminal now that the flag has been renamed.
| // Fallback to opening in new window if UI scripting fails | ||
| // This happens if Ghostty isn't open or accessibility permissions are missing | ||
| // Use Ghostty's -e flag to execute a shell command | ||
| fallbackCmd := exec.Command("open", "-na", "Ghostty", "--args", "-e", "/bin/bash", "-c", fullCmd) |
There was a problem hiding this comment.
When the UI scripting fails (line 38), the code silently falls back to opening a new window. The user gets no indication that tab creation didn't work. Consider logging a message to stderr (e.g., "Ghostty tab creation failed, falling back to new window") so users understand why they're getting windows instead of tabs.
| func OpenTabWithClaude(workDir, initialPrompt, claudeBin string) error { | ||
| cmd := fmt.Sprintf("%s %q", claudeBin, initialPrompt) | ||
| return OpenTab(workDir, cmd) | ||
| } No newline at end of file |
There was a problem hiding this comment.
Missing trailing newline at end of file.
|
|
||
| func (t *GhosttyTerminal) OpenTabWithClaude(workDir, initialPrompt, claudeBin string) error { | ||
| return ghostty.OpenTabWithClaude(workDir, initialPrompt, claudeBin) | ||
| } No newline at end of file |
There was a problem hiding this comment.
Missing trailing newline at end of file.
| cmd.Flags().IntVarP(&resumeSession, "session", "s", 0, "Resume Nth session instead of most recent (1-based)") | ||
| cmd.Flags().BoolVarP(&resumeList, "list", "l", false, "List available sessions without resuming") | ||
| cmd.Flags().BoolVar(&resumeNoITerm, "no-iterm", false, "Print the resume command instead of opening iTerm2") | ||
| cmd.Flags().BoolVar(&resumeNoITerm, "no-terminal", false, "Print the resume command instead of opening terminal") |
There was a problem hiding this comment.
The flag was renamed to --no-terminal, but the Go variable names still reference iTerm: resumeNoITerm (line 21), reviewNoITerm (cmd/review.go:50), workNewNoITerm (cmd/work.go:48). Consider renaming to resumeNoTerminal, reviewNoTerminal, workNewNoTerminal for consistency.
Summary
Changes
Configuration
Ghostty Requirements