diff --git a/build.gradle b/build.gradle
index 4710531..07f2047 100644
--- a/build.gradle
+++ b/build.gradle
@@ -32,7 +32,7 @@ patchPluginXml {
If you want to use another terminal instead - you can!
Just specify your favorite one in the IDE Settings / Preferences.
-
*PowerShell, ConEmu, Cmder, WSL, GitBash, RXVT, iTerm, kitty, Terminator are also supported.
+
*PowerShell, ConEmu, Cmder, WSL, GitBash, RXVT, iTerm, kitty, Terminator, Alacritty, Hyper are also supported.
Since version 0.4, it is available to specify a custom command with \${project.dir} placeholder,
which will be replaced at runtime with the actual project directory.
diff --git a/readme.md b/readme.md
index 6624513..1afce1a 100644
--- a/readme.md
+++ b/readme.md
@@ -8,7 +8,7 @@ Adds a Terminal icon to the IDE toolbar and context menu to open project directo
If you want to use another terminal instead - you can!
Just specify your favorite one in the **IDE Settings / Preferences**.
-
_*PowerShell, ConEmu, Cmder, WSL (bash, wsl), GitBash, RXVT, iTerm are also supported._
+
_*PowerShell, ConEmu, Cmder, WSL (bash, wsl), GitBash, RXVT, iTerm, Alacritty, Kitty, Hyper are also supported._
Since **version 0.4**, it is available to specify a custom command with `${project.dir}` placeholder,
which will be replaced at runtime with the actual project directory.
diff --git a/src/main/java/com/sburlyaev/cmd/plugin/CommandBuilder.java b/src/main/java/com/sburlyaev/cmd/plugin/CommandBuilder.java
index c47f3a4..f9570ec 100644
--- a/src/main/java/com/sburlyaev/cmd/plugin/CommandBuilder.java
+++ b/src/main/java/com/sburlyaev/cmd/plugin/CommandBuilder.java
@@ -96,8 +96,12 @@ public static Command createCommand(@NotNull Environment env,
case MAC_OS:
switch (terminal) {
+ case ALACRITTY:
+ return new Command("open", "-n", "-a", command, "--args", "--working-directory", projectDirectory);
case MAC_TERMINAL:
case I_TERM:
+ case KITTY:
+ case HYPER:
default:
return new Command("open", projectDirectory, "-a", command);
}
diff --git a/src/main/java/com/sburlyaev/cmd/plugin/model/Terminal.java b/src/main/java/com/sburlyaev/cmd/plugin/model/Terminal.java
index a36e266..ac2e4ae 100644
--- a/src/main/java/com/sburlyaev/cmd/plugin/model/Terminal.java
+++ b/src/main/java/com/sburlyaev/cmd/plugin/model/Terminal.java
@@ -23,6 +23,8 @@ public enum Terminal {
// macOS
MAC_TERMINAL("Terminal"),
I_TERM("iTerm"),
+ ALACRITTY("Alacritty"),
+ HYPER("Hyper"),
GENERIC("");
diff --git a/src/test/java/com/sburlyaev/cmd/plugin/CommandBuilderTest.java b/src/test/java/com/sburlyaev/cmd/plugin/CommandBuilderTest.java
index 3f9dc2a..01c2c83 100644
--- a/src/test/java/com/sburlyaev/cmd/plugin/CommandBuilderTest.java
+++ b/src/test/java/com/sburlyaev/cmd/plugin/CommandBuilderTest.java
@@ -126,6 +126,39 @@ public void testCreateCommandForMacOsITerm() throws FileNotFoundException {
assertEquals(expected, result.getCommands());
}
+ @Test
+ @Ignore
+ public void testCreateCommandForMacOsAlacritty() throws FileNotFoundException {
+ Environment env = new Environment(OperationSystem.MAC_OS, "13.3", "X");
+ String projectBaseDir = "/user/home/IdeaProjects/IDEA-Native-Terminal-Plugin";
+ Command result = CommandBuilder.createCommand(env, projectBaseDir, "Alacritty");
+
+ String expected = MessageFormat.format("open -n -a Alacritty --args --working-directory {0}", projectBaseDir);
+ assertEquals(expected, result.getCommands());
+ }
+
+ @Test
+ @Ignore
+ public void testCreateCommandForMacOsKitty() throws FileNotFoundException {
+ Environment env = new Environment(OperationSystem.MAC_OS, "13.3", "X");
+ String projectBaseDir = "/user/home/IdeaProjects/IDEA-Native-Terminal-Plugin";
+ Command result = CommandBuilder.createCommand(env, projectBaseDir, "kitty");
+
+ String expected = MessageFormat.format("open ''{0}'' -a kitty", projectBaseDir);
+ assertEquals(expected, result.getCommands());
+ }
+
+ @Test
+ @Ignore
+ public void testCreateCommandForMacOsHyper() throws FileNotFoundException {
+ Environment env = new Environment(OperationSystem.MAC_OS, "13.3", "X");
+ String projectBaseDir = "/user/home/IdeaProjects/IDEA-Native-Terminal-Plugin";
+ Command result = CommandBuilder.createCommand(env, projectBaseDir, "hyper");
+
+ String expected = MessageFormat.format("open ''{0}'' -a Hyper", projectBaseDir);
+ assertEquals(expected, result.getCommands());
+ }
+
@Test
@Ignore
public void testCheckProjectDirectory() throws FileNotFoundException {
diff --git a/src/test/java/com/sburlyaev/cmd/plugin/model/TerminalTest.java b/src/test/java/com/sburlyaev/cmd/plugin/model/TerminalTest.java
index 77ce498..8ddcd90 100644
--- a/src/test/java/com/sburlyaev/cmd/plugin/model/TerminalTest.java
+++ b/src/test/java/com/sburlyaev/cmd/plugin/model/TerminalTest.java
@@ -134,4 +134,22 @@ public void testFromStringITerm() {
assertEquals(Terminal.I_TERM, result);
}
+ @Test
+ public void testFromStringIAlacritty() {
+ Terminal result = Terminal.fromString("Alacritty");
+ assertEquals(Terminal.ALACRITTY, result);
+ }
+
+ @Test
+ public void testFromStringIKitty() {
+ Terminal result = Terminal.fromString("kitty");
+ assertEquals(Terminal.KITTY, result);
+ }
+
+ @Test
+ public void testFromStringIHyper() {
+ Terminal result = Terminal.fromString("Hyper");
+ assertEquals(Terminal.HYPER, result);
+ }
+
}