-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fix alignment in help #71
base: master
Are you sure you want to change the base?
Conversation
|
||
logLevel* {. | ||
defaultValue: "DEBUG" | ||
desc: "Sets the log level." | ||
name: "log-level" }: string | ||
name: "log-level".}: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! However, why this '.' is needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was added by VS code, I am not sure what is "best practice" whether to have the dot there or not - seems to work in both cases:D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we tend to put the dot there consistently
off by one? |
I don't mind formatting fixes in pull requests, but I find the formatting choices being made here to be highly unusual. Also, I can see that you are planning to use a two-letter abbreviation. I don't think this should be supported by the library, because in the future it intends to add support for the Unix convention of allowing multiple abbreviated options to be concatenated together (e.g. Can you briefly describe what was the logic problem behind the fixed issue? Is it that the code was not taking the account the presence (or absence) of abbreviations when doing the padding width calculation? |
Hi, first of all, I'd like to apologize for unnecessary formatting changes, let me know if you want me to try to avoid those to make the PR simpler.
This PR is an attempt to fix misalignments in help when there are options with and without
abbr
and various lengths ofabbr
and when there are long names of options.I've initially noticed it with
wakucanary
CLI tool:the output looks like this with the change:
and this is an attempt to fix it and make everything aligned (I am sure it will need iterations).