List<OpenShellAction> () { List<OpenShellAction> actions = new ArrayList<>(); if (SystemInfo.isUnix) { ContainerUtil.addIfNotNull(actions, create("/bin/bash", List.of(), "bash")); if (Files.exists(Path.of("/usr/local/bin/zsh"))) { ContainerUtil.addIfNotNull(actions, create("/usr/local/bin/zsh", List.of(), "zsh")); } else { ContainerUtil.addIfNotNull(actions, create("/usr/bin/zsh", List.of(), "zsh")); } ContainerUtil.addIfNotNull(actions, create("/usr/bin/fish", List.of(), "fish")); } else if (SystemInfo.isWindows) { File powershell = PathEnvironmentVariableUtil.findInPath("powershell.exe"); if (powershell != null && StringUtil.startsWithIgnoreCase(powershell.getAbsolutePath(), "C:\\Windows\\System32\\WindowsPowerShell\\")) { ContainerUtil.addIfNotNull(actions, create(powershell.getAbsolutePath(), List.of(), "Windows PowerShell")); } File cmd = PathEnvironmentVariableUtil.findInPath("cmd.exe"); if (cmd != null && StringUtil.startsWithIgnoreCase(cmd.getAbsolutePath(), "C:\\Windows\\System32\\")) { ContainerUtil.addIfNotNull(actions, create(cmd.getAbsolutePath(), List.of(), "Command Prompt")); } File pwsh = PathEnvironmentVariableUtil.findInPath("pwsh.exe"); if (pwsh != null && StringUtil.startsWithIgnoreCase(pwsh.getAbsolutePath(), "C:\\Program Files\\PowerShell\\")) { ContainerUtil.addIfNotNull(actions, create(pwsh.getAbsolutePath(), List.of(), "PowerShell")); } File gitBash = new File("C:\\Program Files\\Git\\bin\\bash.exe"); if (gitBash.isFile()) { ContainerUtil.addIfNotNull(actions, create(gitBash.getAbsolutePath(), List.of(), "Git Bash")); } String cmderRoot = EnvironmentUtil.getValue("CMDER_ROOT"); if (cmderRoot != null && cmd != null && StringUtil.startsWithIgnoreCase(cmd.getAbsolutePath(), "C:\\Windows\\System32\\")) { File cmderInitBat = new File(cmderRoot, "vendor\\init.bat"); if (cmderInitBat.isFile()) { ContainerUtil.addIfNotNull(actions, create(cmd.getAbsolutePath(), List.of("/k", cmderInitBat.getAbsolutePath()), "Cmder")); } } } return actions; }