Skip to content
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 output to be modified with -O #1027

Closed
wants to merge 2 commits into from

Conversation

colincross
Copy link
Contributor

Split the "smart terminal" configuration into three separate settings:
color, elide, and reprint. Allow setting these options individually or
in bulk through a new -O option.

To have build output into a dumb terminal still include ANSI color
codes, for example if you wanted to pass continuous build output through
ansi2html, use:
ninja -O color

To force smart terminal output, use:
ninja -O smart

To force smart terminal output, but still print full status
descriptions:
ninja -O smart -O noelide

Addresses some of the issues in #746 while allowing for adding more
output options in the future.

Split the "smart terminal" configuration into three separate settings:
color, elide, and reprint.  Allow setting these options individually or
in bulk through a new -O option.

To have build output into a dumb terminal still include ANSI color
codes, for example if you wanted to pass continuous build output through
ansi2html, use:
   ninja -O color

To force smart terminal output, use:
   ninja -O smart

To force smart terminal output, but still print full status
descriptions:
   ninja -O smart -O noelide

Addresses some of the issues in ninja-build#746 while allowing for adding more
output options in the future.
Fixes -O reprint -O noelide on linux, and splits elide and reprint on
windows (untested).
@tfarina
Copy link
Contributor

tfarina commented Feb 11, 2016

@martine Evan, did you consider this? Is it fine to you or have you rejected it?

@evmar
Copy link
Collaborator

evmar commented Feb 11, 2016

@nico is in charge now. :)

@johandc
Copy link

johandc commented Jul 27, 2017

This is related to pull request #1230

@jhasse
Copy link
Collaborator

jhasse commented Nov 13, 2018

To have build output into a dumb terminal still include ANSI color
codes, for example if you wanted to pass continuous build output through
ansi2html

This is now possible using env CLICOLOR_FORCE=1 ninja.

To force smart terminal output

On Linux (don't know about other unixes or Windows), this can be done using script.

To force smart terminal output, but still print full status

I think #1210 is the way forward here.

In order to reduce the number of open PRs I'm closing this one, hope that's okay with you.

@jhasse jhasse closed this Nov 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants