File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
src/FSharp.SystemCommandLine Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ The new `Input` module contains functions for the underlying System.CommandLine
7777* ` desc ` adds a description to an ` Option ` or ` Argument `
7878* ` defaultValue ` or ` def ` provides a default value to an ` Option ` or ` Argument `
7979* ` defFactory ` assigns a default value factor to an ` Option ` or ` Argument `
80+ * ` helpName ` adds the name used in help output to describe the option or argument.
8081* ` required ` marks an ` Option ` as required
8182* ` validate ` allows you to return a ` Result<unit, string> ` for the parsed value
8283* ` validateFileExists ` ensures that the ` FileInfo ` exists
Original file line number Diff line number Diff line change @@ -100,6 +100,12 @@ module Input =
100100 |> editOption ( fun o -> o.DefaultValueFactory <- defaultValueFactory)
101101 |> editArgument ( fun a -> a.DefaultValueFactory <- defaultValueFactory)
102102
103+ /// The name used in help output to describe the option or argument.
104+ let helpName ( helpName : string ) ( input : ActionInput < 'T >) =
105+ input
106+ |> editOption ( fun o -> o.HelpName <- helpName)
107+ |> editArgument ( fun a -> a.HelpName <- helpName)
108+
103109 /// Marks an option as required.
104110 let required ( input : ActionInput < 'T >) =
105111 input |> editOption ( fun o -> o.Required <- true )
You can’t perform that action at this time.
0 commit comments