You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sub Main
...
oParser.SetupHelp("?", "help").Callback(GetHelp(oParser.Options))
End Main
Public Function GetHelp(Options As List(Of ICommandLineOption)) As Action(Of String)
Dim oBuilder As StringBuilder
Dim oOption As ICommandLineOption
Dim sUsage As String
Return Sub(Usage)
oBuilder = New StringBuilder
oOption = Options.First
oBuilder.AppendLine($"Backup [(/{oOption.ShortName} | /{oOption.LongName}):JobName]")
oBuilder.AppendLine()
oBuilder.AppendLine("This argument is optional. If it isn't provided, the configuration window is displayed.")
sUsage = oBuilder.ToString
MessageBox.Show(sUsage, "Usage", MessageBoxButtons.OK, MessageBoxIcon.None)
End Sub
End Function
Help doesn't make it obvious that the user needs to include dashes when passing options.
I was working with a novice user with one of my command-line apps. He passed in nothing, it correctly displayed the help:
(not the real options)
So he called
myapp.exe b foo l bar
and it happily did nothing.Showing help like this would make it more obvious:
Would you accept a PR to change the help to this format?
The text was updated successfully, but these errors were encountered: