display cmdparamdesc in optparse-applicative usage messages
Since optparse-applicative display "FOO" as "[FOO]", the paramOptional modifier which wrapped it in square brackets was removed from most places.
This commit is contained in:
parent
a2ba701056
commit
3125da54f6
7 changed files with 15 additions and 11 deletions
|
@ -58,7 +58,7 @@ commandUsage cmd = unlines
|
|||
|
||||
{- Descriptions of params used in usage messages. -}
|
||||
paramPaths :: String
|
||||
paramPaths = paramOptional $ paramRepeating paramPath -- most often used
|
||||
paramPaths = paramRepeating paramPath -- most often used
|
||||
paramPath :: String
|
||||
paramPath = "PATH"
|
||||
paramKey :: String
|
||||
|
@ -114,6 +114,6 @@ paramNothing = ""
|
|||
paramRepeating :: String -> String
|
||||
paramRepeating s = s ++ " ..."
|
||||
paramOptional :: String -> String
|
||||
paramOptional s = "[" ++ s ++ "]"
|
||||
paramOptional s = s
|
||||
paramPair :: String -> String -> String
|
||||
paramPair a b = a ++ " " ++ b
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue