-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Follow STDIN input #100
Comments
This would be really cool and could perhaps be archived by adding an line by line mode. |
Easy to replicate with |
I'm also struggling with this issue. Usually the When I want to view the live output of a series of pipes, I sadly have to switch back to using |
This is not related to buffering. |
Same here (super useful comment, I know) |
Exactly why this is related to line-based buffering, the lack thereof… |
For what it's worth, I created a fix which works, but I need to create more tests for it. I will publish the code later. |
Any progress on this? 🙂 |
It looks like @vtronko's commits on his fork work - I tested them locally. They need to be rebased onto the current main but otherwise looks good. @chmln can you have a look at: vtronko@fcd59ac? |
I know @dev-ardi has interest in making this change. The limiting factor has been maintainer time at the moment (aka I've been very very busy) |
I expect
sd
to follow the STDIN, as it would do in sed.For example, I expect
journalctl -u dnscrypt-proxy.service -f | sd machinename home
to give consistent live output, as
journalctl -u dnscrypt-proxy.service -f | sed '/s/machinename/home/
would. Instead, it just waits for EOF, due to
handle.read_to_end(&mut buffer)?;
I'd suggest to use terminal buffering mode (flush buffer at newline), but that'd break multiline replacement.
This is an important usecase for log inspection routines with custom formatting.
The text was updated successfully, but these errors were encountered: