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

Print Default Values of String-to-String in Sorted Order #365

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vaguecoder
Copy link

Motivation

Issue 362 reported by @SOF3

Changes

Sort keys before stringifying string-to-string flag values.

Summary

String-to-string default values in usage would print in sorted order of keys.
Eg. --foo stringToString usage (default [a=b,c=d])
In the example as per #362, now, the order will be always default [a=b,c=d]

Related Issues

Closes #362

@SOF3
Copy link

SOF3 commented Nov 20, 2022

what about string to other types like integers?

@vaguecoder
Copy link
Author

what about string to other types like integers?

Yes, there are another 2 places. Let this PR be a PoC. We can have set of issue-PR to address those.

  1. String to int
  2. String to int64

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.

StringToString usage output is unstable
3 participants