Skip to content

Cligen 6.2.0: How to preserve order of OR-Group Options in CLI (Avoid Auto-Sorting) #131

@prahladlekhak

Description

@prahladlekhak

I'm using Cligen version 6.2.0 and have a CLI defined with OR ex (login | shutdown | logout | reboot)
However, Cligen automatically sorts these values alphabetically, and when I check tab-completion or help output, it displays them as:
login logout reboot shutdown
I would like to preserve the original order as defined in the CLI.Is there any built-in way to prevent this automatic sorting, or a recommended workaround to maintain the specified order in Cligen?

Any suggestions or guidance would be appreciated.

Thanks!

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