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
Allow pass-through of output #20
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, thanks! The name seems fine to me, agreed that "tee" is too jargony.
Yes, agreed :-) How's |
Probably fine. @mortenpi any other naming suggestions? |
@mortenpi This should be ready to merge (if you're okay with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, just a few bikesheds! Do you mind adding a note into CHANGELOG.md as well?
Co-authored-by: Morten Piibeleht <morten.piibeleht@gmail.com>
All done! |
Oh, it does work if you pass I guess the question is whether we want the passthrough to be consistent with the "input" or the captured output. Both are pretty reasonable behaviors. If we go with the latter (i.e. current behavior), I only that this interaction with |
Good point! It wasn't really something I considered. The current behavior seems ok to me. Indeed, the |
I've added a test for the color behavior as well |
I took the liberty of slightly modifying the tests (adding a stdout/err merging test too, basically, and explicitly checking the color codes). |
Ugh. I guess the real question is whether we need to support 1.0..
|
Yeah, I was just fixing that… I think it's just the test that doesn't run on 1.0. The feature itself should be fine. I'm also okay with testing for the exact escape code, I just wasn't quite sure if they're the same on Windows/Unix, hence just the test for any escape code in the last iteration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, restricting the test to 1.6+ seems fine as well!
I just tested in manually on Julia 1.0. It doesn't crash, but it seems like |
That is a known, documented limitation 😄 Lines 64 to 69 in cea2050
|
Allow to capture
stdout
without disturbing normal output.Closes #19