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

sort: fixed sorters to be split by comma #715

Merged
merged 1 commit into from
Aug 28, 2016
Merged

Conversation

odeke-em
Copy link
Owner

Fixes #714.

Sort attributes passed in from the commandline are csv values e.g

$ 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
$ drive list -sort
  -sort string
      sort items in the order
  * md5.
  * name.
  * size.
  * type.
  * version
  • After
$ drive list -sort
  -sort string
      sort items by a combination of attributes
  * modtime.
  * md5.
  * name.
  * size.
  * type.
  * version

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
```
@odeke-em odeke-em merged commit 0389813 into master Aug 28, 2016
@odeke-em odeke-em deleted the fix-sort-attribute-splits branch September 17, 2016 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant