Repository navigation
Conversation
…anager On Linux, `window().platform` is "linux", which fell through to the macOS commands: `mdfind` isn't there, so Open in never offered an editor, and Open in default app, Show in Finder and the folder menu ran `open`, which isn't there either, and failed. - Editors: each built-in editor gets `bins`, its commands on Linux (`zeditor`/`zed`, `code`/`code-oss`, `cursor`, `windsurf`, `subl`). One `sh` run looks them up on PATH, first found wins, and emits the same name\0path\0 pairs as the Windows probe; the path is run with the file. Extra editors with `bins` are looked up too. - Open in default app: `gio open`, which returns once the app starts. Without gio, `xdg-open` under `setsid -f`, since on desktops it doesn't know (Hyprland, Sway) it runs the app in the foreground until it closes. - Show in file manager: org.freedesktop.FileManager1.ShowItems over `dbus-send` (Nautilus, Dolphin, Nemo and others), with the URI percent-encoded so a comma can't split the array; with no file manager answering, the folder opens instead. - Labels say "file manager" on Linux. macOS and Windows commands are unchanged, and their byte-for-byte tests still pass. Tests run the Linux scripts for real against stand-in programs on a PATH of their own, so they pass on macOS too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lder menu
A `fileManager` setting, `{ "name": "", "command": [] }` by default, names
a program to use in place of Finder, Explorer or the desktop's file
manager: Show in runs its command with the item's path after it, and the
folder menu's Open in with the folder on show. Labels use its name
("Show in Yazi"), or "file manager" without one. A command with an empty
part, or none, leaves the platform's own.
The sidebar reads the setting and shares it as
`better-files.file-manager`, since the right-click menu is a copy of its
own that reads no settings. Local spaces only, as before.
Tests: the setting from mod.json through to the commands run, invalid
commands falling back, and the labels on each platform. The harness's
readTextFile now returns a test's own better-files/mod.json text.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Builds on #39 (Linux support), so its first commit is #39's. Only the second commit, 7b8a47e, is new here.
What it adds
A
fileManagersetting for people whose file manager isn't the platform's: another app, or one their own tooling places, such as a per-workspace file manager.{ "name": "", "command": [] }, keeps today's behaviour. So does a command with an empty part.The right-click menu is a copy of its own that reads no settings, so the sidebar reads the setting and shares it as
better-files.file-manager, the same way it shares the editors it finds.Testing
node --test better-files/tests/*.test.cjs: 124 pass. The new tests follow the setting frommod.jsonto the commands it runs, check that an invalid command falls back to the platform's file manager, and check the labels on each platform. To feed the setting in, the harness'sreadTextFilenow returns a test's ownbetter-files/mod.jsontext; existing tests are unchanged.node --test better-config/tests/*.test.cjs(schema againstDEFAULT_SETTINGS) andnode --test site/tests/*.test.cjspass.node site/build.cjspasses the settings-table check, whichfileManager.nameandfileManager.commandare now in.herdr-app checkpasses.🤖 Generated with Claude Code