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

Shows the help if the command is wrong or empty #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SamvelRaja
Copy link
Contributor

This PR will show up the Help generated by commander when ever an non-supported command has been triggered( Mosted cases it happens for me because of typo.)

And also times when there is no command provided.

Say,

$ember-watson non-supported-command

The command is not supported, Use the below supported commands

  Usage: ember-watson [options] [command] <cmd>


  Commands:

    upgrade-qunit-tests [testsPath]                         Fix QUnit tests to match 2.0 syntax. testsPath defaults to tests/
    convert-prototype-extensions [appPath]                  Convert computed properties and observers to not use prototype extensions. appPath defaults to app/
    convert-ember-data-model-lookups [appPath]              convert Ember Data model lookups to use a dasherized string
    convert-ember-data-async-false-relationships [appPath]  convert Ember Data relationship with implicit async: false to explicit option
    convert-resource-router-mapping [routerPath]            convert the resource router mapping to use the route mapping with the new resetNamespace option
    methodify [path]                                        Convert methods to new ES6 syntax
    find-overloaded-cps [options] [path]                    This lists all the places that will trigger the "Using the same function as getter and setter" deprecation.

  Options:

    -h, --help     output usage information
    -V, --version  output the version number

and for just ember-watson

$ember-watson

Usage: ember-watson [options] [command] <cmd>


  Commands:

    upgrade-qunit-tests [testsPath]                         Fix QUnit tests to match 2.0 syntax. testsPath defaults to tests/
    convert-prototype-extensions [appPath]                  Convert computed properties and observers to not use prototype extensions. appPath defaults to app/
    convert-ember-data-model-lookups [appPath]              convert Ember Data model lookups to use a dasherized string
    convert-ember-data-async-false-relationships [appPath]  convert Ember Data relationship with implicit async: false to explicit option
    convert-resource-router-mapping [routerPath]            convert the resource router mapping to use the route mapping with the new resetNamespace option
    methodify [path]                                        Convert methods to new ES6 syntax
    find-overloaded-cps [options] [path]                    This lists all the places that will trigger the "Using the same function as getter and setter" deprecation.

  Options:

    -h, --help     output usage information
    -V, --version  output the version number

Feel free to add add suggestions or reject this PR if not needed.

@SamvelRaja
Copy link
Contributor Author

Any plan for merging this ??

@abuiles
Copy link
Owner

abuiles commented Dec 9, 2016

@SamvelRaja can you please rebase and I'll merge it after that :)

@knownasilya
Copy link
Collaborator

Ping

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

3 participants