diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/Indexer.hs | 4 | ||||
-rw-r--r-- | app/Server.hs | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/app/Indexer.hs b/app/Indexer.hs index 9560fad..7fc560e 100644 --- a/app/Indexer.hs +++ b/app/Indexer.hs @@ -39,7 +39,9 @@ import Options.Applicative , optional , progDesc , short + , showDefault , strOption + , value ) import Paths_haskell_code_explorer as HSE (version) import System.Directory (createDirectoryIfMissing) @@ -160,7 +162,7 @@ configParser :: Parser IndexerConfig configParser = IndexerConfig <$> strOption - (long "package" <> short 'p' <> metavar "PATH" <> + (long "package" <> short 'p' <> metavar "PATH" <> value "." <> showDefault <> help "Path to a Cabal package") <*> optional (strOption diff --git a/app/Server.hs b/app/Server.hs index 353f808..2304f27 100644 --- a/app/Server.hs +++ b/app/Server.hs @@ -206,7 +206,8 @@ configParser = some (strOption (long "package" <> short 'p' <> metavar "PATH" <> - help "Path to a Cabal package"))) <*> + help "Path to a Cabal package (Default: '.')")) + <|> pure (Directories ["."])) <*> (pure 8080 <|> option auto |