Giter Club home page Giter Club logo

Comments (6)

rozbb avatar rozbb commented on May 13, 2024

As a followup, it might be beneficial to have an option that disables all TUI features (e.g, overwriting lines) to make this easier to deploy in an automated setting like CI

from hyperfine.

stevepentland avatar stevepentland commented on May 13, 2024

@sharkdp I'm interested in taking this on. I'm just going through the codebase now for how everything is processed. What are your thoughts on the input by @doomrobo? If it is desired, would it be better as a separate issue for tracking purposes?

from hyperfine.

sharkdp avatar sharkdp commented on May 13, 2024

As a followup, it might be beneficial to have an option that disables all TUI features (e.g, overwriting lines) to make this easier to deploy in an automated setting like CI

What are your thoughts on the input by @doomrobo?

I tend to think that --color=never (or the absence of a TTY) should also disable all TUI features, yes. I'd be okay with only two modes:

  • All TUI features enabled, including color (if --color=always or if --color=auto and we detect a TTY)
  • All TUI features disabled, no colors (if --color=never or if --color=auto in the absence of a TTY)

We could also think about renaming --color to something different.

I'm interested in taking this on

Sounds great!

We have implemented the same thing in fd, if you want to take a look: https://github.com/sharkdp/fd/blob/1045930dd9a1dcb6058cbf902041d5c2bb31a48f/src/main.rs#L88-L92

from hyperfine.

stevepentland avatar stevepentland commented on May 13, 2024

@sharkdp As a preliminary step I've changed option 'color' to 'style' and changed the possible input values to be 'auto', 'basic', and 'full'. With basic corresponding to either never or auto+no tty, and full corresponding to always or auto+tty.

I've just been tracing through where the different areas that perform output are and have a question. When we're in basic mode, then what should be done with the progress bar? Should it just be removed totally or replaced with something else that makes more sense when output over consecutive lines.

Also, I'd like to refactor where the processing of the matches for args are done out of main to another function, as it may be prudent to put it under test to ensure that future changes don't cause unintended errors.

from hyperfine.

sharkdp avatar sharkdp commented on May 13, 2024

@sharkdp As a preliminary step I've changed option 'color' to 'style' and changed the possible input values to be 'auto', 'basic', and 'full'. With basic corresponding to either never or auto+no tty, and full corresponding to always or auto+tty.

If you like, you could open a PR already. This way, it's easier to discuss the actual implementation.

what should be done with the progress bar?

I'd be okay with removing it completely.

Also, I'd like to refactor where the processing of the matches for args are done out of main to another function, as it may be prudent to put it under test to ensure that future changes don't cause unintended errors.

Sounds great. Maybe this should be a separate PR, though.

from hyperfine.

sharkdp avatar sharkdp commented on May 13, 2024

Closed via #24

from hyperfine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.