Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds configurable support for opening TUI editors via either tmux (existing behavior) or Ghostty, and wires that preference from the macOS app into the bundled git-gabber CLI.
Changes:
- Introduces
SupportedTerminal(shared) and a--terminaloption in the CLI to choose how TUI editors are opened. - Adds a Settings picker in the macOS app and forwards the selected terminal to the CLI invocation.
- Improves “not found” error formatting and adds a small UI hint that installing the CLI is optional.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
git-gabber/gabber.swift |
Adds --terminal option and Ghostty/tmux terminal-opening logic. |
git-gabber/errors.swift |
Adds reusable not-found formatting and a resources-not-found error case. |
gabber/SettingsView.swift |
Adds @AppStorage terminal preference and a picker UI. |
gabber/InstallView.swift |
Adds informational text indicating CLI install is optional. |
gabber/CLI.swift |
Reads terminal preference and passes --terminal to the bundled CLI. |
gabber.xcodeproj/project.pbxproj |
Adds the shared gabber-common folder to the project structure/targets. |
gabber-common/common.swift |
Defines the shared SupportedTerminal enum. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+81
to
+84
| let terminal = | ||
| if let raw = UserDefaults.standard.string(forKey: "terminal") { | ||
| SupportedTerminal(rawValue: raw)! | ||
| } else { SupportedTerminal.tmux } |
| } | ||
|
|
||
| func openTerm(osa: String, _ script: String, cmd editorCmd: String, in dst: URL) throws { | ||
| try cmd(osa, ["-e", script, editorCmd, dst.absoluteString]) |
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.
No description provided.