Skip to content

Sort versions chronologically instead of alphabetically #133

@ardislu

Description

@ardislu

Currently, the solc-select versions output is sorted alphabetically, like this:

$ solc-select versions
0.8.9
0.8.17 (current, set by /home/ubuntu/.virtualenvs/solc-select-dev/.solc-select/global-version)
0.8.10
0.8.0
0.6.5
0.6.0

But I think it'd be easier to read if it was sorted chronologically, like this:

$ solc-select versions
0.6.0
0.6.5
0.8.0
0.8.9
0.8.10
0.8.17 (current, set by /home/ubuntu/.virtualenvs/solc-select-dev/.solc-select/global-version)

Similar projects like nvm also sort chronologically. Example nvm output:

$ nvm ls-remote

(...)

        v18.9.0
        v18.9.1
       v18.10.0
       v18.11.0
       v18.12.0   (LTS: Hydrogen)
       v18.12.1   (Latest LTS: Hydrogen)
        v19.0.0
        v19.0.1
->      v19.1.0
        v19.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions