Ideally this would be a two-fold regex. Each pipe would have a series of rules that would match stdout and stderr. Can pass in a predicate (that would take the line), or a regex string as a matcher, then takes a regex matching string to color a certain part of the output. These pipes could then be used in context managers to color all output during a certain execution context for highlighting huge output.
An even further enhancement to this would be a way to detect "boundaries of output" in some way, and inject dividers like horizontal rules or something. That's something that needs to be thought out a lot though and might never be done, since I can see pipes as a way to structure output being pretty in-depth.
Ideally this would be a two-fold regex. Each pipe would have a series of rules that would match stdout and stderr. Can pass in a predicate (that would take the line), or a regex string as a matcher, then takes a regex matching string to color a certain part of the output. These pipes could then be used in context managers to color all output during a certain execution context for highlighting huge output.
An even further enhancement to this would be a way to detect "boundaries of output" in some way, and inject dividers like horizontal rules or something. That's something that needs to be thought out a lot though and might never be done, since I can see pipes as a way to structure output being pretty in-depth.