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

Irregular ordering of cli command + help text when integer is a part of command #176

Closed
DeekshaBhandary opened this issue Feb 12, 2021 · 1 comment
Labels

Comments

@DeekshaBhandary
Copy link

DeekshaBhandary commented Feb 12, 2021

Looks like string comparison is being done is for all data types.
ex : content of .cli file:
test("Example command") {
1("one"), some_func();
2("two"), some_func();
11("eleven"), some_func();
33("thirty three"), some_func();
22("twenty two"), some_func();
}
cli generated

cfg> test
  1                     one
  11                   eleven      
  2                     two
  22                    twenty two
  33                    thirty three
cfg>

Instead is it possible to have output like(normal sort in integers)

cfg> test
  1                     one
  2                     two
  11                   eleven      
  22                    twenty two
  33                    thirty three
cfg>
olofhagsand added a commit that referenced this issue Feb 17, 2021
…is a part of command #176](#176)

  * Enabled by default `cligen_lexicalorder_set()` using strversmp instead of strcmp
@olofhagsand
Copy link
Member

Enabled by default cligen_lexicalorder_set() using strversmp instead of strcmp

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

2 participants