Sending command text to the terminal but not execute it


From the plugin how to send some command text to the terminal but not execute it and let the user type additional command line arguments, potentially using tab completion etc and then execute the command.

What is the suggested API to implement this?


Please write a string using com.jediterm.terminal.TtyConnector#write(java.lang.String). The string shouldn’t end with \r to avoid execution.
Use com.jediterm.terminal.ui.JediTermWidget#getTtyConnector  to get TtyConnector instance.


Thanks Sergey for your quick response. However I am using this code:

@NotNull ShellTerminalWidget shellTerminalWidget =
                                   TerminalView.getInstance(Objects.requireNonNull(project)).createLocalShellWidget(project.getBasePath(), "MyTab);
// Clearly I need to do something here, otherwise
shellTerminalWidget.getTtyConnector(); // returns null