Skip to content

Commit a14ef05

Browse files
committed
enhance: supports to find zed or zeditor from PATH and ~/.local/bin/zed (#1869)
Signed-off-by: leo <longshuang@msn.cn>
1 parent de7716c commit a14ef05

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/Native/Linux.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,18 @@ public string FindTerminal(Models.ShellOrTerminal shell)
5757
finder.Fleet(() => FindJetBrainsFleet(localAppDataDir));
5858
finder.FindJetBrainsFromToolbox(() => Path.Combine(localAppDataDir, "JetBrains/Toolbox"));
5959
finder.SublimeText(() => FindExecutable("subl"));
60-
finder.Zed(() => FindExecutable("zeditor"));
60+
finder.Zed(() =>
61+
{
62+
var exec = FindExecutable("zeditor");
63+
if (string.IsNullOrEmpty(exec))
64+
{
65+
exec = FindExecutable("zed");
66+
if (string.IsNullOrEmpty(exec))
67+
exec = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".local", "bin", "zed");
68+
}
69+
70+
return exec;
71+
});
6172
return finder.Tools;
6273
}
6374

0 commit comments

Comments
 (0)