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
|
@ -23,7 +23,7 @@ import System.Console.GetOpt
|
|||
|
||||
cmd :: Command
|
||||
cmd = noCommit $ noRepo startNoRepo $ dontCheck repoExists $
|
||||
command "help" (paramOptional "COMMAND") seek SectionCommon "display help"
|
||||
command "help" "COMMAND" seek SectionCommon "display help"
|
||||
|
||||
seek :: CommandSeek
|
||||
seek = withWords start
|
||||
|
|
|
@ -80,7 +80,7 @@ type StatState = StateT StatInfo Annex
|
|||
|
||||
cmd :: Command
|
||||
cmd = noCommit $ dontCheck repoExists $ withOptions (jsonOption : bytesOption : annexedMatchingOptions) $
|
||||
command "info" (paramOptional $ paramRepeating paramItem) seek SectionQuery
|
||||
command "info" (paramRepeating paramItem) seek SectionQuery
|
||||
"shows information about the specified item or the repository as a whole"
|
||||
|
||||
seek :: CommandSeek
|
||||
|
|
|
@ -20,7 +20,7 @@ import qualified Remote
|
|||
|
||||
cmd :: Command
|
||||
cmd = notDirect $ command "rekey"
|
||||
(paramOptional $ paramRepeating $ paramPair paramPath paramKey)
|
||||
(paramRepeating $ paramPair paramPath paramKey)
|
||||
seek SectionPlumbing "change keys used for files"
|
||||
|
||||
seek :: CommandSeek
|
||||
|
|
|
@ -53,7 +53,7 @@ import qualified Data.Map as M
|
|||
|
||||
cmd :: Command
|
||||
cmd = withOptions syncOptions $
|
||||
command "sync" (paramOptional (paramRepeating paramRemote))
|
||||
command "sync" (paramRepeating paramRemote)
|
||||
seek SectionCommon "synchronize local repository with remotes"
|
||||
|
||||
syncOptions :: [Option]
|
||||
|
|
|
@ -18,7 +18,7 @@ import Command.View (checkoutViewBranch)
|
|||
|
||||
cmd :: Command
|
||||
cmd = notBareRepo $ notDirect $
|
||||
command "vpop" (paramOptional paramNumber) seek SectionMetaData
|
||||
command "vpop" paramNumber seek SectionMetaData
|
||||
"switch back to previous view"
|
||||
|
||||
seek :: CommandSeek
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue