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

list: sort should accept multiple attributes #714

Closed
odeke-em opened this issue Aug 28, 2016 · 0 comments
Closed

list: sort should accept multiple attributes #714

odeke-em opened this issue Aug 28, 2016 · 0 comments
Labels
Milestone

Comments

@odeke-em
Copy link
Owner

I just noticed offline that trying to apply a sort over list only works on the first attribute

$ drive list -sort name_r,modtime

It should apply a sort on all the passed in attributes, separated by commas.

@odeke-em odeke-em added the bug label Aug 28, 2016
@odeke-em odeke-em added this to the v0.3.8 milestone Aug 28, 2016
odeke-em added a commit that referenced this issue Aug 28, 2016
Fixes #714.

Sort attributes passed in from the commandline are csv values e.g
```shell
$ drive list -sort name_r,modtime
```

The bug previously was that these values were actually never getting
split by comma values, in cmd/drive/main. This CL ensures that we
do the necessary splitting and whitespace trimming before we
make the sorters.
odeke-em added a commit that referenced this issue Aug 28, 2016
Fixes #714.

Sort attributes passed in from the commandline are csv values e.g
```shell
$ drive list -sort name_r,modtime
```

The bug previously was that these values were actually never getting
split by comma values, in cmd/drive/main. This CL ensures that we
do the necessary splitting and whitespace trimming before we
make the sorters.

It also updates the CLI doc on sort:
* Before
```shell
$ drive list -sort
  -sort string
      sort items in the order
  * md5.
  * name.
  * size.
  * type.
  * version
```

* After
```shell
$ drive list -sort
  -sort string
      sort items by a combination of attributes
  * modtime.
  * md5.
  * name.
  * size.
  * type.
  * version
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant