cli/command
Mislav Marohnić 108f7bd66c Dirty workaround to display helpful error message on mistyped subcommands
When executing `gh pr re` (note the incomplete command name), Cobra
would just display the help text for `gh pr` on standard output, exit
with status 0, and not print any message that you have mistyped the
"re" subcommand. Each part of this behavior is wrong.

This workaround makes sure that the helpful error message is printed on
stderr:

    $ gh pr re
    unknown command "re" for "gh pr"

    Did you mean this?
            reopen
            ready
            review

However, the exit status is still 0, whereas it should be non-zero.
Since `HelpFunc` does not return an error argument, we cannot trigger an
error status from this workaround.
2020-05-22 19:02:34 +02:00
..
completion.go Remove obsolete hack to generate fish completions 2020-05-13 12:51:55 +02:00
completion_test.go Update all calls to RunCommand 2020-05-05 09:20:01 -07:00
config.go cosmetic 2020-05-19 12:03:56 +09:00
config_test.go Update all calls to RunCommand 2020-05-05 09:20:01 -07:00
credits.go review feedback 2020-05-08 14:29:50 -05:00
issue.go cosmetic 2020-05-19 12:03:56 +09:00
issue_test.go Guard against leaked parameters in issue/pr create tests 2020-05-12 16:54:54 +02:00
pr.go Avoid crash around "DISMISSED" or "PENDING" reviewer states 2020-05-20 14:59:40 +02:00
pr_checkout.go pass apiClient to determineBaseRepo 2020-05-15 15:29:33 -05:00
pr_checkout_test.go Update all calls to RunCommand 2020-05-05 09:20:01 -07:00
pr_create.go Fix metadata resolver query 2020-05-12 16:48:30 +02:00
pr_create_test.go Merge remote-tracking branch 'origin/master' into issue-metadata-resolve-ids 2020-05-13 17:20:37 +02:00
pr_diff.go better names 2020-05-19 14:08:20 -05:00
pr_diff_test.go properly handle REST errors 2020-05-19 11:58:49 -05:00
pr_review.go pass apiClient to determineBaseRepo 2020-05-15 15:29:33 -05:00
pr_review_test.go tyop fix + stricter switch 2020-05-11 17:39:52 -05:00
pr_test.go Avoid crash around "DISMISSED" or "PENDING" reviewer states 2020-05-20 14:59:40 +02:00
repo.go Merge pull request #943 from cli/reauth-bug 2020-05-18 13:16:07 +02:00
repo_test.go Update all calls to RunCommand 2020-05-05 09:20:01 -07:00
root.go Dirty workaround to display helpful error message on mistyped subcommands 2020-05-22 19:02:34 +02:00
root_test.go respect ssh 2020-04-22 14:21:01 -05:00
testing.go Merge pull request #874 from cli/httpmock 2020-05-08 17:34:57 +02:00
title_body_survey.go reenable skipping body prompt for pr/issue 2020-05-18 10:23:20 -05:00