mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Cleanup
This commit is contained in:
@@ -220,29 +220,22 @@ public class ExecUtil {
|
||||
public static List<String> getTerminalCommand(@Nullable String title, @NotNull String command) {
|
||||
if (SystemInfo.isWindows) {
|
||||
title = title != null ? title.replace("\"", "'") : "";
|
||||
return Arrays.asList("cmd.exe", "/c", "start", GeneralCommandLine.inescapableQuote(title), command);
|
||||
return Arrays.asList(getWindowsShellName(), "/c", "start", GeneralCommandLine.inescapableQuote(title), command);
|
||||
}
|
||||
else if (SystemInfo.isMac) {
|
||||
return Arrays.asList(getOpenCommandPath(), "-a", "Terminal", command); // todo: title?
|
||||
}
|
||||
else if (hasKdeTerminal.getValue()) {
|
||||
return Arrays.asList("/usr/bin/konsole", "-e", command); // todo: title?
|
||||
return title != null ? Arrays.asList("/usr/bin/konsole", "-p", "tabtitle=\"" + title.replace("\"", "'") + "\"", "-e", command)
|
||||
: Arrays.asList("/usr/bin/konsole", "-e", command);
|
||||
}
|
||||
else if (hasGnomeTerminal.getValue()) {
|
||||
if (title != null) {
|
||||
return Arrays.asList("/usr/bin/gnome-terminal", "-t", title, "-x", command);
|
||||
}
|
||||
else {
|
||||
return Arrays.asList("/usr/bin/gnome-terminal", "-x", command);
|
||||
}
|
||||
return title != null ? Arrays.asList("/usr/bin/gnome-terminal", "-t", title, "-x", command)
|
||||
: Arrays.asList("/usr/bin/gnome-terminal", "-x", command);
|
||||
}
|
||||
else if (hasXTerm.getValue()) {
|
||||
if (title != null) {
|
||||
return Arrays.asList("/usr/bin/xterm", "-T", title, "-e", command);
|
||||
}
|
||||
else {
|
||||
return Arrays.asList("/usr/bin/xterm", "-e", command);
|
||||
}
|
||||
return title != null ? Arrays.asList("/usr/bin/xterm", "-T", title, "-e", command)
|
||||
: Arrays.asList("/usr/bin/xterm", "-e", command);
|
||||
}
|
||||
|
||||
throw new UnsupportedSystemException();
|
||||
|
||||
Reference in New Issue
Block a user