Git Product home page Git Product logo

Comments (4)

Arcterus avatar Arcterus commented on May 25, 2024

The original plan was for the format to be utilname: error: msg in most cases, but I've started to think the error: bit wastes too much space (as with most of these utilities almost any message written to stderr is an error).

I'm not entirely sure what you mean by "nested together" unless you are referring to Invalid value for '--bytes <NUMBER>': '-' is not a number or is too large, which I believe is a result of clap. I also think the GNU and BusyBox errors messages are not clear unless you already understand how the utility works.

from mesabox.

mssun avatar mssun commented on May 25, 2024

For the first question:

  1. utilname: error: msg
  2. error: msg
  3. utilname: msg

I'm not sure which one is better. Seems that Rust's tradition tends to use the second one and "error" is highlighted in red.

For the second question, I mean the error message is in one line and separated in colon. E.g., the current one is:

utilname: error: msg: sub-msg

It looks a little wired (probably because of the prefix utilname: error). Yes, the current message of GNU and BusyBox is not clear, and I was not suggesting to be consistent with them.

cargo uses the same format:

$ cargo build -j abc
error: Invalid value: could not parse `abc` as a number

from mesabox.

Arcterus avatar Arcterus commented on May 25, 2024

I think we need to keep everything as one line, so the best way to fix this I guess would be to remove the error: part.

from mesabox.

mssun avatar mssun commented on May 25, 2024

Ok, agree.

BTW, I'm coming up this issue when writing testcases for errors.

from mesabox.

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.