Yarn: Add `yarn i` shorthand

Created on 11 Oct 2016  ยท  4Comments  ยท  Source: yarnpkg/yarn

I always use npm shorthands but yarn doesn't allow users to use aliases such as yarn i. Is it possible to add this feature ?

Do you want to request a _feature_ or report a _bug_?
Feature

What is the current behavior?

โ†’ yarn i
yarn i v0.15.1
error Did you mean `yarn install`?
info Visit http://yarnpkg.com/en/docs/cli/i for documentation about this command.

What is the expected behavior?

โ†’ yarn i
yarn i v0.15.1
[1/4] ๐Ÿ”  Resolving packages...
[2/4] ๐Ÿšš  Fetching packages...
[3/4] ๐Ÿ”—  Linking dependencies...
[4/4] ๐Ÿ“ƒ  Building fresh packages...
success Saved lockfile.
โœจ  Done in 11.33s.

Please mention your node.js, yarn and operating system version.
Node v6.0.0
yarn 0.15.1
macOS OSX

cat-feature

Most helpful comment

Also, yarn install already has a shortcut - yarn.

All 4 comments

npm has added a litany of aliases over the years - personally I think that adding these mostly undocumented "shortcuts" has made it really hard for users to google for documentation, to know that they're typing the right command, etc.

If yarn adds "i", should it also add every other npm shortcut?

I'd rather see all the shortcuts added such that they immediately error out, instructing the user with the correct command (kind of like git does).

Also, yarn install already has a shortcut - yarn.

No shortcuts please. It's better to save a trip to documentation than save a few keystrokes. You can alias whatever you want anyways.

@ljharb Agree with your point. Using a shortcut is hard to google for documentation and like @AlicanC said, I can setup my own alias.

Was this page helpful?
0 / 5 - 0 ratings