apache / apache/cordova

Unsuccessful (because not existing) cordova commands

Open
#75 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
No language data
Stars
710
Forks
75
PR merge metrics
No merged PRs in 30d

Description

I looked a bit at the Cordova Telemetry data about the commands executed:
https://datastudio.google.com/reporting/0B-Ja5cNOX_XLTElHdWd4V2NUem8/page/zkJF

Looking at the `unsuccessful` commands, you quickly notice that quite a few are common misunderstandings (or just mistypes of) what Cordova commands exist:

![image](https://user-images.githubusercontent.com/183673/52914110-a41f3c00-32c4-11e9-9f10-d0280aec66b5.png)
(standard current data set, filtered to >100 usages)

When the user uses one of those commands they already get a helpful note to use the help command:

```
λ cordova install
Cordova does not know install; try `cordova help` for a list of all the available commands.
```

But I think we could do better.

For all the subcommands that are missing `platform` or `plugin`, we could just tell them that e.g. "`add` is only a valid subcommand of `cordova platform` or `cordova plugin`" (or similar, same for `remove` and `rm` etc.).

`ios` and `android` are only valid parametrs for subcommands of `platform` like `cordova platform add`, `cordova platform run` etc.

Common typos we could just accept and redirect to the correct command: `platfrom`, `plataform`, `plaform`, `plateform`, `paltform`, `requirement` etc.

Mixups between CLIs as well: `start` should probably be `create` (and is because Ionic CLI calls their "create new project" command `start`)

---

Is there any reason why we should _not_ do this and improve the live of our users?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.