TerminalStudio / xterm.dart

💻 xterm.dart is a fast and fully-featured terminal emulator for Flutter, with support for mobile and desktop platforms.
https://pub.dev/packages/xterm
MIT License
492 stars 95 forks source link

Can I exec command in Terminal object? #175

Closed CreateChance closed 1 year ago

CreateChance commented 1 year ago

Can I exec unix command in Terminal object like this:

terminal.write("ls -l");

or someway else? I need to run command by dart code here. :)

CreateChance commented 1 year ago

I got how to deal with this issue, do not use write method, use textInput instead:

terminal.textInput("ls -l\n"); // with new line at the end.

The terminal object will write your text to console and run it! 💯