diff --git a/src/Models/ShellOrTerminal.cs b/src/Models/ShellOrTerminal.cs index e8e5854754..fb94f31967 100644 --- a/src/Models/ShellOrTerminal.cs +++ b/src/Models/ShellOrTerminal.cs @@ -48,6 +48,7 @@ static ShellOrTerminal() new ShellOrTerminal("otty", "Otty", "Otty"), new ShellOrTerminal("cmux", "cmux", "cmux"), new ShellOrTerminal("mux0", "mux0", "mux0"), + new ShellOrTerminal("alacritty-term", "Alacritty", "Alacritty", "--working-directory"), }; } else diff --git a/src/Native/MacOS.cs b/src/Native/MacOS.cs index c289ea67ac..809768eb9e 100644 --- a/src/Native/MacOS.cs +++ b/src/Native/MacOS.cs @@ -118,9 +118,13 @@ public void OpenInFileManager(string path) Process.Start("open", $"{path.Quoted()} -R"); } - public void OpenTerminal(string workdir, string _) + public void OpenTerminal(string workdir, string args) { - Process.Start("open", $"-a {OS.ShellOrTerminal} {workdir.Quoted()}"); + if (string.IsNullOrEmpty(args)) { + Process.Start("open", $"-a {OS.ShellOrTerminal} {workdir.Quoted()}"); + } else { + Process.Start("open", $"-a {OS.ShellOrTerminal} --args {args} {workdir.Quoted()}"); + } } public void OpenWithDefaultEditor(string file) diff --git a/src/Resources/Images/ShellIcons/alacritty-term.png b/src/Resources/Images/ShellIcons/alacritty-term.png new file mode 100644 index 0000000000..b811788284 Binary files /dev/null and b/src/Resources/Images/ShellIcons/alacritty-term.png differ