Yarn: Fix yarn ls

Created on 26 Sep 2017  路  7Comments  路  Source: yarnpkg/yarn

Do you want to request a feature or report a bug?

Report a bug.

If the current behavior is a bug, please provide the steps to reproduce.

Run yarn ls

What is the expected behavior?

Per the yarn docs:

The yarn list command mimics the expected Unix behavior of listing.

But yarn ls doesn't work. yarn list does, but the expected abbreviation is ls not list: Eg any other example of the aforementioned Unix behavior:

ls
lsmod
lsattr
npm ls

Please mention your node.js, yarn and operating system version.

node 8.4
yarn 1.1.0

Most helpful comment

I see this thread is a couple of months old and I got here because ls is not working for me neither.
@BYK: you closed this topic with the following reason: "This was a conscious change to make commands more user-friendly"

Well, I think user friendly would mean to use the good-old patterns that everybody use. Use ls, rm etc...
I don't really understand what is your point with full words. As a user I don't want to set up aliases, or learn new terms for commands. And yes, it is quicker to work with a tool where a command consists 2 characters or 3.

I have to press 7 letters to find out the version? Makes no sense! People who are using your tool most probably know linux commands, why would you confuse them with new ones?

All 7 comments

This was a conscious change to make commands more user-friendly: #3898 , #3989.

@BYK yarn is now inconsistent with every other Unix program. I understand adding 'friendly' aliases (I;m doubtful about how friendly 'list' is to Linux and Unix users) but that doesn't mean ls has to break. Please consider adding an alias so ls works again.

The idea is to have a single way to do things and them to be consistent. Yarn is now consistent in itself. Backwards compatibility just for the sake of it keeps us locked into old technical limitations that does not apply anymore: https://www.youtube.com/watch?v=h5-DRLfzqD0

You can always add your own aliases: https://yarnpkg.com/blog/2017/06/19/adding-command-line-aliases-for-yarn/

@BYK Unix commands being short for legacy reasons doesn't mean yarn has to spell 'list' differently from every other command. Even Windows supports 'ls' out of the box as an alias for get-childitem.

Since most users are used to spelling 'list' as ls, it would be better to include this alias out of the box.

How many users use multiple commands? How many users use only yarn?

Which would you consider to be the greater number?

@mikemaccana maybe we can re-add the reminder about list when the user does ls but that's a maintenance burden. Also if we add back ls then we need to add rm too and then possibly others. Where do we stop?

Somebody needs to stand their ground to make change happen. Not saying it is great but it is at least internally consistent and this is the very first or second complaint we got since the change so maybe it is okay to break things for progress?

I see this thread is a couple of months old and I got here because ls is not working for me neither.
@BYK: you closed this topic with the following reason: "This was a conscious change to make commands more user-friendly"

Well, I think user friendly would mean to use the good-old patterns that everybody use. Use ls, rm etc...
I don't really understand what is your point with full words. As a user I don't want to set up aliases, or learn new terms for commands. And yes, it is quicker to work with a tool where a command consists 2 characters or 3.

I have to press 7 letters to find out the version? Makes no sense! People who are using your tool most probably know linux commands, why would you confuse them with new ones?

@byk: stop when all the common acronyms are implemented. And yes I bet you'll get more people using ls and rm than list and remove

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danez picture danez  路  3Comments

torifat picture torifat  路  3Comments

sebmck picture sebmck  路  3Comments

davidmaxwaterman picture davidmaxwaterman  路  3Comments

jviotti picture jviotti  路  3Comments