Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ managed Git worktrees. Requires the `timber` CLI and an Xcode toolchain.
field (`type worktree@repo`). `@` narrows by repo, e.g. `f@scribble`.
- Typing a qualified `name@repo` that does not exist yet offers a `+` row
to create it (`timber create --no-herdr`), then opens it in Zed.
- Row click or Return opens the worktree in Zed (`zed --new`).
- Row click or Return opens the worktree in Zed (`zed <path>`, respecting the CLI new/existing window setting).
- Selected rows show Zed / Herdr / delete buttons. Herdr runs
`timber herdr space --new` (or creates with `--herdr`) and posts a
notification instead of opening Zed.
Expand Down
5 changes: 3 additions & 2 deletions Sources/Timber/TimberCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,12 @@ enum TimberCommand {

// MARK: - Open

/// Open a path in Zed (`zed --new`), falling back to Finder `open`
/// Open a path in Zed (`zed <path>`, respecting the user's CLI setting
/// for new vs. existing window), falling back to Finder `open`
/// when Zed is not installed.
static func openPath(_ path: String) throws {
if let zed = findExecutable("zed") {
let result = try run(zed, args: ["--new", path])
let result = try run(zed, args: [path])
if result.code == 0 {
return
}
Expand Down
Loading