-
Notifications
You must be signed in to change notification settings - Fork 31
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
Feature request: Option in Tee to remove color #108
Comments
Thanks for the report. I'll probably end up doing the simple thing, but I'm asking in case you can see a "better" alternative. Outside of tee, this would normally be solved with pipes. Specifically, So, considering that this is open source, there's a single repo that implements piping and execution that also has tee. It seems like it ought to be possible for tee to support pipes on the file stream, and the challenge is inventing a syntax to let it do so that doesn't create more problems than it solves. Would it make sense to be able to do something like: Another option would be to optionally invert tee's behavior. Currently tee writes to a file (without pipe support), and writes to stdout (which can be further piped.) An inverted tee would write to the display (without pipe support) and write to stdout (which can be further piped, ultimately to a file.) Part of the reason I'm asking is because I think there are other operations that make sense to perform on the file as well (eg. iconv.) Of course, there may be other options too. Do you see any more generic/elegant approach to this aside from hardcoding one specific operation into tee? |
While I think the idea of having the double pipe sounds cool, to be able to pipe to I'm really new to using Yori, so I can't say right now how else I would use the new piping engine that would be required to do this for As far as inverting In some ways, I think your example of Otherwise, it would probably be something like |
Please consider an option for Tee to strip off color escape sequences when writing to the output file.
For example, I ran
du | tee <file>
, and I had to manually edit out all of the color escape sequences after it was finished.The text was updated successfully, but these errors were encountered: