Fix aliased yarn commands like yarn ls

[Yarn] has a handful of subcommand [aliases], but does not automatically
[correct] them for the user. This makes it so that `fuck` will do the
trick. For example:

    $ yarn ls
    yarn ls v0.20.3
    error Did you mean `yarn list`?
    info Visit https://yarnpkg.com/en/docs/cli/list for documentation about this command.
    $ fuck
    yarn list [enter/?/?/ctrl+c]

[Yarn]: https://yarnpkg.com/en/
[aliases]: https://github.com/yarnpkg/yarn/blob/0adbc59b18b38b6ac6e4b248e19788ed1d2e80da/src/cli/aliases.js
[correct]: https://github.com/yarnpkg/yarn/pull/1044#issuecomment-253763230
This commit is contained in:
Joseph Frazier
2017-02-26 20:26:15 -05:00
parent 91c27e1a62
commit 7e16a2eb7c
3 changed files with 37 additions and 0 deletions
+1
View File
@@ -247,6 +247,7 @@ using the matched rule and runs it. Rules enabled by default are as follows:
* `vagrant_up` – starts up the vagrant instance;
* `whois` – fixes `whois` command;
* `workon_doesnt_exists` – fixes `virtualenvwrapper` env name os suggests to create new.
* `yarn_alias` – fixes aliased `yarn` commands like `yarn ls`;
Enabled by default only on specific platforms: