Skip to content

Introduce --sort: Sort by Header #95

Description

@Dentrax

Check list

  • I have read through the README
  • I have searched through the existing issues

Environment info

  • OS
    • Linux
    • Mac OS X
    • Windows
    • Others:

Version

csview 1.2.2

Problem / Steps to reproduce

Thanks for such an awesome project! This is rock! 🔥

It would be nice to have a (--sort|--sort-by|--sort-asc|--sort-dsc) flag to sort items by providing header name: (I'm not sure about the flag namings)

"h1", "h2", "h3"
"ccc", "bbb", "aaa"
"bbb", "ccc", "bbb"
"aaa", "aaa", "ccc"

For example:

  • csview --sort-asc h1:
"h1", "h2", "h3"
"aaa", "aaa", "ccc"
"bbb", "ccc", "bbb"
"ccc", "bbb", "aaa"
  • csview --sort-dsc h2:
"h1", "h2", "h3"
"bbb", "ccc", "bbb"
"ccc", "bbb", "aaa"
"aaa", "aaa", "ccc"

WDYT?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions