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

shared: improve the help message #2887

Closed
wants to merge 1 commit into from
Closed

Conversation

zimbatm
Copy link
Member

@zimbatm zimbatm commented May 23, 2019

For subcommands, the default message was confusing. It directs the user to the top-level help which is not what the user wants.

Ideally the message would be Try 'nix <sub-command> --help' for more information. but that would require some more refactoring.

Before:

$ nix repl --wrong --help
error: unrecognised flag '--wrong'
Try 'nix --help' for more information.

After:

$ nix repl --wrong
error: unrecognised flag '--wrong'
Add '--help' to the command for usage information.

For subcommands, the default message was confusing.

Before:

    $ nix repl --wrong --help
    error: unrecognised flag '--wrong'
    Try 'nix --help' for more information.

After:

    $ nix repl --wrong
    error: unrecognised flag '--wrong'
    Add '--help' to the command for usage information.
@edolstra
Copy link
Member

The new message is a bit misleading though, since just adding --help doesn't work if the parser fails earlier:

$ nix repl --wrong --help
error: unrecognised flag '--wrong'
Try 'nix --help' for more information.

@zimbatm zimbatm closed this Aug 13, 2019
@zimbatm zimbatm deleted the helpful-help branch August 13, 2019 07:34
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

2 participants