1
1
mirror of https://github.com/github/semantic.git synced 2024-12-21 05:41:54 +03:00

Simplify how the output is defaulted to stdout.

This commit is contained in:
Rob Rix 2017-07-19 20:07:17 -04:00
parent 201f9358f8
commit aaf39930b0

View File

@ -41,7 +41,8 @@ arguments = info (version <*> helper <*> argumentsParser) description
argumentsParser = (. Task.writeToOutput) . (>>=)
<$> hsubparser (diffCommand <> parseCommand)
<*> (maybe (Left stdout) Right <$> optional (strOption (long "output" <> short 'o' <> help "Output path, defaults to stdout")))
<*> ( Right <$> strOption (long "output" <> short 'o' <> help "Output path, defaults to stdout")
<|> pure (Left stdout) )
diffCommand = command "diff" (info diffArgumentsParser (progDesc "Show changes between commits or paths"))
diffArgumentsParser = runDiff