Closed dustdfg closed 9 months ago
Ok I actually found the solution but it is Unix only (who needs windows but still). I used named pipes thought nature of pipes differs from nature of files so if accidentally do something wrong it can "crash" micro because it will infinitely wait while the underlying program will read from named pipe...
In my plugin I need to use a program, something like cli command for accessing files stored in for example database. Its "api" looks like:
app print file_id
that prints file to stdout andapp save file_id
that reads file from stdin and saves to db. Micro allows to run command and get result from it, thanks toRunCommand
. IIUC It means that I can useapp print file_id
for getting file from the db but I don't see how I can useapp save file_id
because I can't write current buffer to pipe of another program...