diff options
| author | Maxime Coste <mawww@kakoune.org> | 2021-06-15 21:38:17 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2021-07-07 19:25:06 +1000 |
| commit | 3d7fb8ddbce37a078cbc2235dd5faed968c69024 (patch) | |
| tree | 92b5d41a03d2f5eb26b55124747ceabb3db3a4e9 /src/event_manager.hh | |
| parent | 6215bff76414a36575421f646c8504e5a93f54f6 (diff) | |
Add support for $kak_command_fifo and $kak_response_fifo
Those fifos are accessible during %sh{...} blocks, the command fifo
executes commands written to it once the write end side is closed
(multiple open/write/close sequences are supported), the response
fifo is a simple helper fifo available to write response back to
the shell process
An example use of this feature is to request some list options
content from without being limited by the environment size:
```
%sh{
echo "echo -to-file $kak_response_fifo -quoting shell -- %opt{some_list}" > $kak_command_fifo
eval "set -- $(cat $kak_response_fifo)"
}
```
Diffstat (limited to 'src/event_manager.hh')
| -rw-r--r-- | src/event_manager.hh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/event_manager.hh b/src/event_manager.hh index b7a9720f..edf52e3e 100644 --- a/src/event_manager.hh +++ b/src/event_manager.hh @@ -46,6 +46,7 @@ public: void run(FdEvents events, EventMode mode); + void reset_fd(int fd) { m_fd = fd; } void close_fd(); void disable() { m_fd = -1; } |
