Skip to content

Asking for help with '-h' is not an error #45

@ernstki

Description

@ernstki

Vincent, might I convince you that it's not an error to ask for help?

What I mean by that is that -h output should go to standard out (so it can piped straight into another tool such as grep or less without weird redirections) and that git toolbelt-utility -h should return zero exit status, rather than non-zero.

Probably none of the git-toolbelt utilities fall into this category, but one thing I find personally frustrating is when a program's --help is pages long, and yet command --help | less doesn't work (because the output goes to stderr). Now, I know that |& less or 2>&1 | less will work, but does everyone?

If the user supplies an invalid argument (or no arguments), then yes, usage >&2; exit 2;; is warranted. No disagreement there.

I will of course defer to your own philosophical leanings here, and especially if you're of the SemVer persuasion, since this would warrant a 2.0 release, as it breaks the existing git-toolbelt API, as it were, albeit in a benign way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions