Open michelecos opened 2 years ago
So would this involve
For reference "Terminal.java" has the following comments within:
* A {@link org.netbeans.lib.terminalemulator.Term}-based terminal component for
* inside NetBeans.
* <p>
* The most straightforward way of using it is as follows:
* <pre>
import org.netbeans.lib.richexecution.Command;
import org.netbeans.lib.richexecution.Program;
*
public void actionPerformed(ActionEvent evt) {
// Ask user what command they want to run
String cmd = JOptionPane.showInputDialog("Command");
if (cmd == null || cmd.trim().equals(""))
return;
TerminalProvider terminalProvider = TerminalProvider.getDefault();
Terminal terminal = terminalProvider.createTerminal("command: " + cmd);
Program program = new Command(cmd);
terminal.startProgram(program, true);
}
* </pre>
* @author ivan
So, is this as simple of having the "cmd" to start a given shell defined and executed in some way? Or is there more to it (i.e., IOProvided, etc.)?
Months probably years ago I also had a look into this, there are some checks for pty stuff and unfortunately I failed get this working without checks for windows. Atm I wanted to update this plugin: https://github.com/fungl164/JConsole it has, unfortunately a couple of bugs with the cursor, but maybe this could be somehow a good start?
We also talked about it here: https://github.com/apache/netbeans/issues/6210 maybe implementing one of these solutions could help?
Description
NetBeans lacks proper support for launching a command line session with cmd or PowerShell and still requires installation of Cygwin.
Use case/motivation
I would like to be able a command line session in the project or current file directory. Maybe with a chance to choose the shell between the obvious choices for windows: cmd, PowerShell, maybe WSL, maybe Git bash.
Related issues
No response
Are you willing to submit a PR?
Code of Conduct