Add short options for codebase and codebase-create (#2952)

This commit is contained in:
Chris Penner 2022-02-28 13:33:53 -06:00 committed by GitHub
parent 18ae061385
commit 0fa6052aac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,6 +34,7 @@ import Options.Applicative
, hsubparser , hsubparser
, info , info
, long , long
, short
, metavar , metavar
, option , option
, parserFailure , parserFailure
@ -244,7 +245,8 @@ codebasePathParser :: Parser (Maybe CodebasePathOption)
codebasePathParser = do codebasePathParser = do
optString <- optional . strOption $ optString <- optional . strOption $
long "codebase" long "codebase"
<> metavar "codebase/path" <> short 'c'
<> metavar "CODEBASE/PATH"
<> help "The path to an existing codebase" <> help "The path to an existing codebase"
pure (fmap DontCreateCodebaseWhenMissing optString) pure (fmap DontCreateCodebaseWhenMissing optString)
@ -252,7 +254,8 @@ codebaseCreateParser :: Parser (Maybe CodebasePathOption)
codebaseCreateParser = do codebaseCreateParser = do
path <- optional . strOption $ path <- optional . strOption $
long "codebase-create" long "codebase-create"
<> metavar "codebase/path" <> short 'C'
<> metavar "CODEBASE/PATH"
<> help "The path to a new or existing codebase (one will be created if there isn't one)" <> help "The path to a new or existing codebase (one will be created if there isn't one)"
pure (fmap CreateCodebaseWhenMissing path) pure (fmap CreateCodebaseWhenMissing path)