mirror of
https://github.com/tio/tio.git
synced 2026-05-01 23:07:58 +02:00
Add option '--exec <command>' for running shell command
Runs shell command with I/O redirected to device.
This commit is contained in:
parent
545d473220
commit
e75e19eb00
9 changed files with 89 additions and 10 deletions
|
|
@ -2277,6 +2277,12 @@ int tty_connect(void)
|
|||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
if (option.exec != NULL)
|
||||
{
|
||||
int status = execute_shell_command(device_fd, option.exec);
|
||||
exit(status);
|
||||
}
|
||||
|
||||
/* Input loop */
|
||||
while (true)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue