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
, info
, long
, short
, metavar
, option
, parserFailure
@ -244,7 +245,8 @@ codebasePathParser :: Parser (Maybe CodebasePathOption)
codebasePathParser = do
optString <- optional . strOption $
long "codebase"
<> metavar "codebase/path"
<> short 'c'
<> metavar "CODEBASE/PATH"
<> help "The path to an existing codebase"
pure (fmap DontCreateCodebaseWhenMissing optString)
@ -252,7 +254,8 @@ codebaseCreateParser :: Parser (Maybe CodebasePathOption)
codebaseCreateParser = do
path <- optional . strOption $
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)"
pure (fmap CreateCodebaseWhenMissing path)