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?

0

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.

0

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
0

请先登录再写评论。