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

Show up suitable messages if the user makes a typo. #356

Closed
jamesgeorge007 opened this issue Jun 2, 2019 · 2 comments · Fixed by #358
Closed

Show up suitable messages if the user makes a typo. #356

jamesgeorge007 opened this issue Jun 2, 2019 · 2 comments · Fixed by #358
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities

Comments

@jamesgeorge007
Copy link
Contributor

As per now vsce <unknown_cmd> only manages to show up the output of vsce --help.
It would be nice to have a suitable message such as unknown command <cmd> along with a suggestion for matching commands.

Proposed idea

Warning for unknown commands.

vsce random

Usage: vsce [options] [command]

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

Commands:
  ls [options]                         Lists all the files that will be published
  package [options]                    Packages an extension
  publish [options] [<version>]        Publishes an extension
  unpublish [options] [<extensionid>]  Unpublishes an extension. Example extension id: microsoft.csharp.
  ls-publishers                        List all known publishers
  create-publisher <publisher>         Creates a new publisher
  delete-publisher <publisher>         Deletes a publisher
  login <publisher>                    Add a publisher to the known publishers list
  logout <publisher>                   Remove a publisher from the known publishers list
  show [options] <extensionid>         Show extension metadata
  search [options] <text>              search extension gallery
  *

Unknown command random

Suggest matching commands if the user makes a typo.

vsce packag

Usage: vsce [options] [command]

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

Commands:
  ls [options]                         Lists all the files that will be published
  package [options]                    Packages an extension
  publish [options] [<version>]        Publishes an extension
  unpublish [options] [<extensionid>]  Unpublishes an extension. Example extension id: microsoft.csharp.
  ls-publishers                        List all known publishers
  create-publisher <publisher>         Creates a new publisher
  delete-publisher <publisher>         Deletes a publisher
  login <publisher>                    Add a publisher to the known publishers list
  logout <publisher>                   Remove a publisher from the known publishers list
  show [options] <extensionid>         Show extension metadata
  search [options] <text>              search extension gallery
  *

Unknown command packag

Did you mean package?
@jamesgeorge007
Copy link
Contributor Author

@joaomoreno Shall I shoot up a PR 🤔

@joaomoreno
Copy link
Member

Sure!

@joaomoreno joaomoreno added feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities labels Jun 3, 2019
@joaomoreno joaomoreno added this to the Backlog milestone Jun 3, 2019
@jamesgeorge007 jamesgeorge007 changed the title Show up suitable messages when unknown commands are provided Show up suitable messages if the user makes a typo. Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants