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

Less quoting in error messages #309

Closed
birkenfeld opened this issue Oct 5, 2015 · 5 comments
Closed

Less quoting in error messages #309

birkenfeld opened this issue Oct 5, 2015 · 5 comments
Labels
C-enhancement Category: Raise on the bar on expectations
Milestone

Comments

@birkenfeld
Copy link
Contributor

IMO this is a bit too much quoting:

error: The following required arguments were not supplied:
        '<pattern>'

Either 'pattern' or <pattern> would be enough.

@kbknapp kbknapp added T: RFC / question S-waiting-on-decision Status: Waiting on a go/no-go before implementing labels Oct 5, 2015
@kbknapp
Copy link
Member

kbknapp commented Oct 5, 2015

This was originally set up because of args that have spaces in them (-x <value>..., or -y <value1> <value2>etc.) so that people wouldn't be confused and think perhaps it's two arguments missing a \n

For now, I'd say we leave the current implementation, but I'm open to opposing arguments if you can sway me 😉

@birkenfeld
Copy link
Contributor Author

Would this be printed like this:

error: The following required arguments were not supplied:
        -x <value>
        -y <value1> <value2>

Not sure I understand the possible confusion.

@kbknapp
Copy link
Member

kbknapp commented Oct 7, 2015

I've been thinking about this specifically since you mentioned it, and the more I think about it the more I agree with you. The quoting does add additional noise for little to no gain.

I think what I was originally "worried" about could otherwise be passed off as poor CLI design anyways...and I'm not sure we need to be in the business of catering to every edge case. The "poor design" I'm thinking of is a single positional argument with more than one value.

error: The following required arguments were not supplied:
        <pos1>
        <pos2_val1> <pos2_val2>

But like I said, that's a stretch and super edge case.

I'll edit this title and remove quoting from certain instances tracking for 1.4.6. @birkenfeld (and all) what's your thought on quoting inside error sentences? I.e. error: The argument '-a' can't be used with '-b <value>'?

@kbknapp kbknapp added C-enhancement Category: Raise on the bar on expectations and removed T: RFC / question S-waiting-on-decision Status: Waiting on a go/no-go before implementing labels Oct 7, 2015
@kbknapp kbknapp changed the title Less quoting in error messages? Less quoting in error messages Oct 7, 2015
@kbknapp kbknapp added this to the 1.4.6 milestone Oct 7, 2015
@sru
Copy link
Contributor

sru commented Oct 7, 2015

@kbknapp I think quoting inside error sentences is fine.

@birkenfeld
Copy link
Contributor Author

I agree.

homu added a commit that referenced this issue Oct 13, 2015
fix(Errors): tones down quoting in some error messages

Closes #309 

Turns out it's just a single message which quotes outside a sentence.
@homu homu closed this as completed in #317 Oct 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Raise on the bar on expectations
Projects
None yet
Development

No branches or pull requests

3 participants