-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 help option text for user-defined -h short flags #658
Conversation
index.js
Outdated
* @api private | ||
*/ | ||
Command.prototype.optionHelp = function() { | ||
// check if there is an overriding user-defined `-h` short flag |
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.
Could you modify the tab width to match other codes?
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.
my bad!
See amended commit.
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.
👍
…ed option with short flag -h.
As far as I understand the pr, it introduce only overrides of short option for help (e.g. |
@vanesyan, correct. On master, before PR, a custom short option -h overrides the help short option, but the help information text was still showing -h as an option for the help command. The PR doesn't touch the functionality of the options, and --help is still not overridable. |
BTW, I think it's breaking change, and we should come back here, when the next major release happen. |
Thanks for taking a look. Let me know if I can make any changes to fix
conflicts with new changes that you have.
…On Jul 12, 2017 5:38 AM, "Roman Vanesyan" ***@***.***> wrote:
BTW, I think it's breaking change, and we should come back here, when the
next major release happen.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#658 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEfnCS-h6CRMMqRv-3A0d5fY77uGgK87ks5sNLBFgaJpZM4OTdQg>
.
|
Yes, I will addressing this issue when we come to 3.0. Thank you :) |
How is this a breaking change? |
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.
Are you still interested in more work on this @TDress?
I have some changes I would like made. Checking whether you are still engaged before I go further.
(One reminder to self, user can actually override --help
as well as -h
.)
No problem if you are no longer interested, I'll find somewhere to reference this work for future use by someone else.
Thank you for your contributions.
I had a look into this and don't think it is much risk of it being a breaking change @vanesyan since it just affects the display of the built-in help line in the built-in help and does not change the runtime behaviour otherwise. Add a comment if you have a usage case in mind which would break. Almost every change in a widely used program may break someone @HRK44, but I am trying not to be too paranoid! 😨 |
Thanks for reaching out, but I won't be able to look at it in the near
future
…On Thu, Apr 25, 2019, 5:53 PM John Gee ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Are you still interested in more work on this @TDress
<https://github.com/TDress>?
I have some changes I would like made. Checking whether you are still
engaged before I go further.
(One reminder to self, user can actually override --help as well as -h.)
No problem if you are no longer interested, I'll find somewhere to
reference this work for future use by someone else.
Thank you for your contributions.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#658 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABD6OCP3FLQGM3Q773D7YILPSI77ZANCNFSM4DSN2QQA>
.
|
This fixes issue #645
if there is a user-defined -h option, the text displayed when running --help should not list a -h short flag for both the help and user-defined options.