-
Notifications
You must be signed in to change notification settings - Fork 56
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
Question - Custom HelpHooks #40
Comments
Is it possible that you have 2 help hooks registered in your argument definition? Without looking at your complete code I can't imagine how this can happen. Your override code is not calling the base method so that base code should not execute. If you share your complete code I can take a look. Thanks, |
Thanks for getting back to me so quickly! Yes, I did have two HelpHooks registered. I was trying both alongside each other to start with, with the Url one omitted from the usage: #region Global Options
[HelpHook]
[ArgShortcut("?")]
public bool Help { get; set; }
[ArgShortcut("~")]
[OmitFromUsageDocs]
[UrlHelpHook("myhelpurl.html")]
public bool HelpUrl { get; set; }
#endregion Global Options So you can only have one? At the moment, I have 3 action methods, with 4-6 arguments each - so the help text is getting too long for the console window. Is there a way I could customise the usage, so that:
If it would be possible to do this, I wouldn't need UrlHelpHook at all really! Thanks! |
Fixed in 2.5.0.0 [HelpHook] will now automatically know if there was an action specified on the command line and will only show specific help for that action in that case. |
How would I go about creating a custom help hook, that opened up a URL instead of writing to console, for example?
I created UrlHelpHook : HelpHook and overrode the AfterCancel event, but whichever one I call, it always performs both the HelpHook AfterCancel and the UrlHelpHook AfterCancel.
The text was updated successfully, but these errors were encountered: