mirror of
https://github.com/github/semantic.git
synced 2024-12-21 13:51:44 +03:00
Simplify how the output is defaulted to stdout.
This commit is contained in:
parent
201f9358f8
commit
aaf39930b0
@ -41,7 +41,8 @@ arguments = info (version <*> helper <*> argumentsParser) description
|
|||||||
|
|
||||||
argumentsParser = (. Task.writeToOutput) . (>>=)
|
argumentsParser = (. Task.writeToOutput) . (>>=)
|
||||||
<$> hsubparser (diffCommand <> parseCommand)
|
<$> 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"))
|
diffCommand = command "diff" (info diffArgumentsParser (progDesc "Show changes between commits or paths"))
|
||||||
diffArgumentsParser = runDiff
|
diffArgumentsParser = runDiff
|
||||||
|
Loading…
Reference in New Issue
Block a user