Drain all buffered PTY output into the vt100 parser. Returns true if any data was consumed.
(&mut self)
| 77 | /// Drain all buffered PTY output into the vt100 parser. |
| 78 | /// Returns true if any data was consumed. |
| 79 | pub fn process(&mut self) -> bool { |
| 80 | let mut got = false; |
| 81 | while let Ok(bytes) = self.rx.try_recv() { |
| 82 | let fixed = fix_escape_sequences(&bytes); |
| 83 | |
| 84 | // Feed to parser first so screen state is current when we |
| 85 | // respond to any terminal queries embedded in the output. |
| 86 | self.parser.process(&fixed); |
| 87 | respond_to_queries(&mut self.writer, &fixed, self.parser.screen()); |
| 88 | got = true; |
| 89 | } |
| 90 | got |
| 91 | } |
| 92 | |
| 93 | /// Returns the child process command name from /proc/<pid>/comm, if available. |
| 94 | pub fn process_name(&self) -> Option<String> { |
no test coverage detected